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

840 Commits

Author SHA1 Message Date
Glenn Morris
4a6558983d * configure.ac: Be explicit about ImageMagick version in summary. 2017-07-24 19:51:27 -04:00
Paul Eggert
b46a02eda4 Do not use ImageMagick 7 and later
Suggested by Glenn Morris (Bug#25967#15).
* configure.ac (IMAGEMAGICK_MODULE): Reject 7 and later.
2017-07-24 15:14:32 -07:00
Glenn Morris
e7f6518758 Don't automatically enable Gconf if Gsettings was found
* configure.ac (HAVE_GCONF) [HAVE_GSETTINGS]:
Don't test for Gconf unless specifically requested.
Gconf was deprecated in favor of Gsettings several years ago.
2017-07-22 18:43:28 -07:00
Glenn Morris
e8ba01d1a2 * configure.ac (MODULES_SUFFIX): Always give it a value.
This prevents a Makefile thinko like "rm *${MODULE_SUFFIX}".
2017-07-22 18:36:22 -07:00
Paul Eggert
05b8b86699 GnuTLS integer-overflow and style fixes
This tweaks the recently-added GnuTLS improvements so that
they avoid some integer-overflow problems and follow typical
Emacs style a bit better.
* configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
(HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the
configure-time results are displayed.
* src/fns.c (extract_data_from_object): Return char *, not char
const *, since one gnutls caller wants a non-const pointer.  Use
CONSP rather than !NILP when testing for conses.  Use CAR_SAFE
instead of rolling our own code.  Prefer signed types to unsigned
when either will do.  Report problems for lengths out of range,
instead of silently mishandling them.
* src/gnutls.c (emacs_gnutls_strerror): New function, to simplify
callers.  All callers of gnutls_sterror changed.
(Fgnutls_boot): Check for integers out of range rather than
silently truncating them.
(gnutls_symmetric_aead): Check for integer overflow in size
calculations.
(gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests):
Prefer signed to unsigned integers where either	will do.
(gnutls_symmetric_aead, gnutls_symmetric):
Work even if ptrdiff_t is wider than ‘long’.
(gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest):
Check for integer overflow in algorithm selection.
2017-07-14 16:36:18 -07:00
Ted Zlatanov
583995c62d
GnuTLS HMAC and symmetric cipher support
* etc/NEWS: Add news for new feature.

    * doc/lispref/text.texi (GnuTLS Cryptography): Add
    documentation.

    * configure.ac: Add macros HAVE_GNUTLS3_DIGEST,
    HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_AEAD, HAVE_GNUTLS3_HMAC.

    * src/fns.c (Fsecure_hash_algorithms): Add function to list
    supported `secure-hash' algorithms.
    (extract_data_from_object): Add data extraction function that
    can operate on buffers and strings.
    (secure_hash): Use it.
    (Fsecure_hash): Mention `secure-hash-algorithms'.

    * src/gnutls.h: Include gnutls/crypto.h.

    * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
    (gnutls_symmetric, Fgnutls_symmetric_encrypt, Fgnutls_symmetric_decrypt)
    (Fgnutls_macs, Fgnutls_digests, Fgnutls_hash_mac, Fgnutls_hash_digest)
    (Fgnutls_available_p): Implement GnuTLS cryptographic integration.

    * test/lisp/net/gnutls-tests.el: Add tests.
2017-07-14 11:06:16 -04:00
Paul Eggert
24faf6b0d2 Don’t use -Woverride-init
I have some further changes in mind that would also need to
disable the -Woverride-init warnings.  In practice these warnings
seem to be more trouble than they’re worth, so disable them in the
cc command line.
* configure.ac: Disable -Woverride-init here ...
* src/bytecode.c: ... rather than here.
2017-07-05 18:59:30 -07:00
Paul Eggert
dfe73cb06f Remove getc_unlocked configure-time check
* configure.ac (getc_unlocked): Remove check, as unlocked-io now
does this for us.
2017-06-22 13:19:29 -07:00
Ken Raeburn
85f6aa33f5 Merge several Lisp reader speedups. 2017-06-21 22:46:10 -04:00
Ken Raeburn
efe200c10d Use getc_unlocked.
* configure.ac: Check for getc_unlocked.
* src/charset.c (read_hex, load_charset_map_from_file): Use
getc_unlocked instead of getc.
(getc_unlocked) [!HAVE_GETC_UNLOCKED]: Fall back to getc.
* src/lread.c (readbyte_from_file, Fget_file_char, read1,
getc_unlocked): Likewise.
2017-06-21 22:34:33 -04:00
Philipp Stephani
c66a7cce17 emacs-module.h: Create emacs_env_26
This was part of the original design of the module
API (https://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00960.html),
but I didn't take it into account when adding the should_quit
function.

Instead of duplicating the environment fields or using the C
preprocessor, use configure to build emacs-module.h.

* configure.ac: Expand emacs-module.h template.
2017-06-17 19:16:14 +02:00
Paul Eggert
21d10e59f8 Pacify clang without munging C source
* configure.ac (WARN_CFLAGS): With Clang, use
-Wno-tautological-compare regardless of --enable-gcc-warnings.
(WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set.
* lib/strftime.c: Copy from gnulib, reverting Clang-specific
change which I hope is no longer needed.
* src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on
some older non-POSIX hosts.
2017-06-15 13:30:30 -07:00
Paul Eggert
1ac8c9bb9b Port './configure CC=clang' to Fedora 25
* configure.ac (HAVE_IMAGEMAGICK): Disable if even a
standard function like MagickRelinquishMemory does not link.
2017-06-15 11:25:51 -07:00
Philipp Stephani
58b9b098a4 Inline test module Makefile into main test Makefile
The test/data/emacs-module/Makefile only built a single target, and
inlining it into test/Makefile simplifies dependency tracking and
reduces code duplication.

* configure.ac: Don't build test/data/emacs-module/Makefile.

* Makefile.in ($(test_module)): Inline compilation.
(clean): Also clean test module outputs.
2017-06-13 20:48:15 +02:00
Philipp Stephani
c90a97adc4 Use Autoconf to generate the test module Makefile
This makes it easier to pass compilation flags around.

* configure.ac: Also build test module Makefile.

* test/data/emacs-module/Makefile.in: New makefile template.

* test/Makefile.in ($(test_module)): No longer necessary to pass
@MODULES_SUFFIX@ around.

* .gitignore: Test module Makefile can now be ignored.
2017-06-12 16:09:37 +02:00
Alan Third
0d676deba4 Check if instancetype supported in ObjC
* configure.ac: Add check for instancetype.
* src/nsterm.h [!NATIVE_OBJC_INSTANCETYPE]: Define instancetype.
2017-05-27 00:46:23 +01:00
Paul Eggert
cd9c7a0617 Don't warn about missing brances on macOS
On macOS, removing -Wmissing-braces is not enough; the warning has to
be disabled explicitly.
2017-05-23 21:18:35 +02:00
Paul Eggert
a5acb3701a Port --enable-gcc-warnings to clang 3.9.1
* configure.ac (WERROR_CFLAGS): Omit -Wmissing-braces for Clang,
to shut off a false alarm.  Problem reportd by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00521.html
2017-05-19 16:05:54 -07:00
Paul Eggert
af4ac3dc85 Port --enable-gcc-warnings to clang 3.9.1
* configure.ac (WERROR_CFLAGS): Omit -Wdouble-promotion if clang.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00495.html
2017-05-18 20:42:34 -07:00
Paul Eggert
2e1bebe279 Merge with gnulib, pacifying GCC 7
This incorporates:
2017-05-16 manywarnings: update for GCC 7
2017-05-15 sys_select: Avoid "was expanded before it was required"
* configure.ac (nw): Suppress GCC 7’s new -Wduplicated-branches and
-Wformat-overflow=2 options, due to too many false alarms.
* doc/misc/texinfo.tex, lib/strftime.c, m4/manywarnings.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
* src/coding.c (decode_coding_iso_2022):
Fix bug uncovered by -Wimplicit-fallthrough.
* src/conf_post.h (FALLTHROUGH): New macro.
Use it to mark all switch cases that fall through.
* src/editfns.c (styled_format): Use !, not ~, on bool.
* src/gtkutil.c (xg_check_special_colors):
When using sprintf, don’t trust Gtk to output colors in [0, 1] range.
(xg_update_scrollbar_pos): Avoid use of possibly-uninitialized bool;
this bug was actually caught by Clang.
* src/search.c (boyer_moore):
Tell GCC that CHAR_BASE, if nonzero, must be a non-ASCII character.
* src/xterm.c (x_draw_glyphless_glyph_string_foreground):
Tell GCC that glyph->u.glyphless.ch must be a character.
2017-05-16 10:27:41 -07:00
Glenn Morris
4ce6e94c99 Add oldxmenu to system-configuration-features
* configure.ac (HAVE_OLDXMENU): New.
(emacs_config_features): Add oldxmenu.
2017-05-15 20:56:46 -04:00
Paul Eggert
bc4d618552 Check list object type if --enable-gcc-warnings
* configure.ac (--enable-check-lisp-object-type):
Default to "yes" if --enable-gcc-warnings is not "no".
* etc/NEWS: Mention this.
* src/eval.c (internal_lisp_condition_case): Fix some glitches
with 'volatile' uncovered by the above: in particular, 'clauses'
should be a pointer to volatile storage on the stack, and need not
be volatile itself.  Use an int, not ptrdiff_t, to count clauses.
Don’t bother gathering binding count if VAR is nil.  Use
more-specific local names to try to clarify what’s going on.
2017-05-02 15:02:15 -07:00
Paul Eggert
634d0a907f Merge from gnulib
This incorporates:
2017-05-01 New module 'localtime-buffer'
2017-04-30 utimens: Add support for native Windows
* admin/merge-gnulib (AVOIDED_MODULES): Add tzset.
* configure.ac (tzset): No need for Emacs itself to check now.
* lib/gettimeofday.c, lib/time.in.h, lib/time_rz.c, lib/utimens.c:
* m4/gettimeofday.m4, m4/time_h.m4, m4/time_rz.m4: Copy from gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/localtime-buffer.c, lib/localtime-buffer.h:
* m4/localtime-buffer.m4: New files, copied from gnulib.
* src/editfns.c (init_editfns): Assume tzset is callable.
2017-05-01 15:33:26 -07:00
Ken Brown
b72e36047c * configure.ac: Suggest Mailutils on Cygwin. 2017-05-01 14:37:26 -04:00
Philipp Stephani
bfc0f610ba Integrate module test with normal test suite
* test/Makefile.in (ELFILES): Exclude module test if modules aren't
configured.
(EMACS_TEST_DIRECTORY): Expand test directory so that it's set
correctly even if Emacs changes the current directory.
($(srcdir)/src/emacs-module-tests.log)
($(test_module)): Proper dependency tracking for test module.

* test/data/emacs-module/Makefile (ROOT): Adapt to new location.
Remove 'check' target and EMACS variable, which are no longer
necessary.
(SO): Change to include period.

* test/src/emacs-module-tests.el (mod-test): Use EMACS_TEST_DIRECTORY
environment variable to reliably find test data.

* configure.ac (HAVE_MODULES, MODULES_SUFFIX): Add necessary
substitutions.
2017-04-29 14:38:53 +02:00
Paul Eggert
3a11b3e330 Use find -delete if available
This shortens the ‘make’ output and should avoid some
repetitive scanning of directories during a build.
* configure.ac (FIND_DELETE): New var.
* lisp/Makefile.in (compile-always, bootstrap-clean):
* test/Makefile.in (clean, bootstrap-clean): Use it.
* test/Makefile.in (ELCFILES, LOGSAVEFILES): Remove; no longer needed.
2017-03-30 19:51:39 -07:00
Paul Eggert
3bb5af3a32 Improve configure --with-pop etc. diagnostics
* configure.ac: Improve diagnostics re --with-pop and
--with-mailutils (Bug#26102).
2017-03-21 13:55:26 -07:00
Eli Zaretskii
650defd4e7 Revert "Make --without-pop the default."
This reverts commit 9319de675e.
2017-03-21 21:04:56 +02:00
Paul Eggert
8a58133ee6 Don’t remove dependency files when configuring
Problem reported by Tom Tromey in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00533.html
* configure.ac: Don’t remove */*.o and */deps/* when
--enable-autodepend is in effect.
2017-03-21 11:14:52 -07:00
Paul Eggert
9319de675e Make --without-pop the default.
Suggested by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00431.html
* configure.ac: Change the default from --with-pop to
--without-pop.  Adjust diagnostics to match.
2017-03-21 11:14:51 -07:00
Paul Eggert
bf8cf95d7d Streamline dependency-file generation
* configure.ac (AUTODEPEND_PARENTS): New var.
mkdir the dependency directories here, to simplify ‘make’.
Remove dependency files just before outputting Makefiles, so that
they are preserved if ‘configure’ exits early due to some other problem.
* lib/Makefile.in, lwlib/Makefile.in, oldXMenu/Makefile.in:
* src/Makefile.in: Adjust deps strategies to be similar, as follows:
(MKDEPDIR): Remove.  All uses removed.  This cuts down on the
number of processes spun off by ‘make’.
(clean mostlyclean): Remove $(DEPDIR) contents, not $(DEPDIR) itself.
(distclean): Remove $(DEPDIR) itself.
* lwlib/Makefile.in (all): Move to front, so that depdir includes
do not alter default action.
2017-03-21 09:59:31 -07:00
Paul Eggert
3c4ec7e1d2 Fix problem with out-of-date dependencies
Problem reported by Robert Marshall in:
http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00501.html
Although this problem has been with us for a while, the recent
change from Automake to GNU Make exposed it again.
* configure.ac (AUTO_DEPEND): When autodepending, clean out any
leftover dependency and object files, since the previous sources'
dependencies may disagree with the current ones.  Reconfiguring
typically needs to force a rebuild anyway.
2017-03-20 08:57:50 -07:00
Paul Eggert
6f17e14f78 * configure.ac: Fix typo in diagnostic. 2017-03-17 21:37:10 -07:00
Paul Eggert
65faa7bcb5 Switch from Automake to GNU Make
Emacs assumes GNU Make, and GNU Make has much of the functionality of
Automake built-in.  The Emacs build process uses Automake primarily
because Emacs uses some Gnulib code and Gnulib formerly required
Automake.  Now that Gnulib no longer requires Automake, Emacs can
stop using Automake and this should simplify Emacs maintenance
in the future (Bug#26100).  Although this patch may look long, most of
it is generated automatically: the changes to build-aux/config.guess,
build-aux/config.sub, build-aux/install-sh, and lib/gnulib.mk.in are
all done by admin/merge-gnulib.
* .gitignore: Remove build-aux/ar-lib, build-aux/compile,
build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
build-aux/install-sh, build-aux/missing, and lib/Makefile.in,
as they are no longer built by autogen.sh.
Add lib/gnulib.mk, as it is now built by 'configure'.
Remove nt/gnulib.mk, as it is no longer built by 'make'.
* INSTALL.REPO, README, admin/make-tarball.txt:
Remove mention of Automake.
* Makefile.in (AUTOCONF, AUTOMAKE, AUTOHEADER, ACLOCAL, lib)
(AUTOCONF_INPUTS, ACLOCAL_PATH, ACLOCAL_INPUTS)
($(srcdir)/aclocal.m4, AUTOMAKE_INPUTS)
($(srcdir)/lib/Makefile.in, $(srcdir)/nt/gnulib.mk, am--refresh):
Remove.
($(MAKEFILE_NAME)): Depend on lib/gnulib.mk.in.
($(srcdir)/configure, $(srcdir)/src/stamp-h.in)
($(srcdir)/src/config.in):
Use autogen.sh instead of doing it by hand.
* admin/merge-gnulib (AVOIDED_MODULES, avoided_flags)):
New vars, to simplify processing of avoided modules.
(GNULIB_TOOL_FLAGS): Move --avoid flags into AVOIDED_MODULES.
Add --gnu-make, and change makefile name to gnulib.mk.in.
Copy config.guess, config.sub, and install-sh too, since
Automake no longer does that for us.
* admin/notes/copyright:
* admin/update_autogen (genfiles):
Update list of files.
Remove hack for nt/gnulib.mk, a file that is no longer needed.
* autogen.sh (progs): Remove Automake.
(automake_min): Remove.
Build aclocal.m4 so that autoreconf need not use aclocal.
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh:
New files, copied from Gnulib.  These are now updated by
admin/merge-gnulib instead by autogen.sh.
* configure.ac (AC_PROG_MAKE_SET, ACLOCAL_PATH, AM_CONDITIONAL):
Remove.
(AM_INIT_AUTOMAKE, AM_SILENT_RULES): Remove call.
(AC_PROG_CC_C_O): Call this instead of AM_PROG_CC_C_O.
(BUILDING_FOR_WINDOWSNT, HYBRID_MALLOC_LIB): Remove; no longer needed.
(--disable-silent-rules): New option, since Automake no longer
does this for us.
(AM_V, AM_DEFAULT_V): Set unconditionally, and do not bother
with AM_SUBST_NOTMAKE.
(AC_PROG_INSTALL): Add call.
(MAKEINFO): Do not bother with the 'missing' program.
(MAKEINFO, SYSTEM_TYPE): AC_SUBST.
(AC_CONFIG_FILES): Add Makefile, lib/gnulib.mk.
(SUBDIR_MAKEFILES): Remove duplication.
* lib/Makefile.am: Remove, replacing with:
* lib/Makefile.in: New file, with the old Makefile.am contents
and with the following changes:
(AUTOMAKE_OPTIONS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST)
(MOSTLYCLEANDIRS, MOSTLYCLEANFILES, noinst_LIBRARIES, SUFFIXES)
(AM_CFLAGS, DEFAULT_INCLUDES, libegnu_a_SOURCES, libegnu_a_LIBADD)
(EXTRA_libegnu_a_SOURCES, libegnu_a_SHORTNAME, libegnu_a_CPPFLAGS):
Remove.
(VPATH, abs_top_builddir, top_builddir, top_srcdir, all, AM_V_AR)
(AM_V_CC, AM_V_GEN, AM_V_at, DEPDIR, DEPFLAGS, MKDEPDIR, SYSTEM_TYPE)
(libgnu.a, libegnu.a, ETAGS, $(ETAGS), tags, TAGS, clean)
(mostlyclean, distclean, bootstrap-clean, maintainer-clean):
New macros and rules, since Automake no longer does them.
Include ../nt/gnulib-cfg.mk if SYSTEM_TYPE is windows-nt,
instead of including ../nt/gnulib.mk if BUILDING_FOR_WINDOWS_NT.
Include dependency files if AUTO_DEPEND.
(ALL_CFLAGS, AUTOCONF_INPUTS, libgnu_a_OBJECTS, libegnu_a_OBJECTS):
New macros.
(bootstrap-clean): Depend on distclean, not maintainer-clean,
and remove gnulib.mk.
(AUTOCONF_INPUTS, $(top_srcdir)/configure, ../config.status, Makefile):
New macros and rules, copied from ../Makefile.in.
($(libegnu_a_OBJECTS), $(libgnu_a_OBJECTS)): Depend on BUILT_SOURCES.
(.c.o, e-%.o): New generic rules.
* lib/gnulib.mk: Remove.
* lib/gnulib.mk.in: New file, which is built by autogen.sh
and contains much of what used to be in lib/gnulib.mk.
* m4/gnulib-common.m4: Copy from gnulib.
* make-dist: Do not distribute build-aux/compile, build-aux/depcomp,
build-aux/missing, build-aux/ar-lib, lib/Makefile.am, nt/gnulib.mk,
nt/gnulib-modules-to-delete.cfg.  Distribute lib/Makefile.in,
lib/gnulib.mk.in, and nt/gnulib-cfg.mk instead.
* nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1, ${srcdir}/gnulib.mk): Remove.
* nt/gnulib-cfg.mk: New file, which supersedes ...
* nt/gnulib-modules-to-delete.cfg: ... this file, which is removed.
* src/Makefile.in (ACLOCAL_INPUTS): Remove.
(AUTOCONF_INPUTS): Merge ACLOCAL_INPUTS into it.
($(top_srcdir)/configure, ../config.status, config.in Makefile):
Defer to parent Makefile.
2017-03-17 11:42:34 -07:00
Paul Eggert
9c07e888a7 Don't suggest Mailutils on MS-Windows
* configure.ac: Don't suggest GNU Mailutils on MS-Windows, as it
hasn't been ported.
2017-03-17 03:22:46 -07:00
Paul Eggert
9f771f6440 Emacs 'movemail' is now a configure-time option
The new configure option --with-mailutils lets the builder say
that Emacs should assume that GNU Mailutils is installed, instead
of continuing to build and install its own limited and insecure
substitute for 'movemail'.
* INSTALL, etc/NEWS, etc/PROBLEMS: Mention --with-mailutils.
* configure.ac: Add --with-mailutils option.
(with_mailutils): New variable.
Do not bother configuring 'movemail' when not building it.
Warn about issues relating to --with-mailutils.
* doc/emacs/rmail.texi (Movemail): Mention --with-mailutils.
(Movemail, Remote Mailboxes): Document port numbers in
POP and IMAP URLs.
* lib-src/Makefile.in (with_mailutils): New macro.
(UTILITIES): Use it.
2017-03-17 00:15:48 -07:00
Paul Eggert
995be66f0f Install update-game-score only on request
Most distributions do not install update-game-score properly
due to setuid/setgid complications, so install it only when
the installer specifies a user or group (Bug#25895).
* .gitattributes: Remove lib-src/update-game-score.exe.manifest.
* Makefile.in (gameuser, gamegroup, use_gamedir, PATH_GAME):
New vars.
(epaths-force): Use PATH_GAME.
(uninstall): Remove snake-scores and tetris-scores only if shared.
* configure.ac: Default --with-gameuser to 'no'.
(UPDATE_MANIFEST): Remove.
* etc/NEWS: Mention this.
* lib-src/Makefile.in (UPDATE_MANIFEST): Remove.
(use_gamedir): New macro.
(UTILITIES): Remove update-game-score unless use_gamedir.
(SCRIPTS): Remove $(UPDATE_MANIFEST).
($(DESTDIR)${archlibdir}): Install game directory program and data
only if use_gamedir.
* lib-src/update-game-score.exe.manifest: Remove, as
update-game-score is no longer installed on MS-Windows.
* lisp/play/gamegrid.el (gamegrid-add-score-with-update-game-score):
Use auxiliary program only if setuid or setgid.
* make-dist: Do not distribute update-game-score.exe.manifest.
* src/callproc.c (init_callproc):
Set Vshared_game_score_directory based on PATH_GAME, not DOS_NT.
(syms_of_callproc): Remove unnecessary initialization of
Vshared_game_score_directory.
2017-03-12 12:04:10 -07:00
Paul Eggert
14af3395e6 Define copysign on all platforms
* configure.ac (copysign): Remove test.
* src/floatfns.c (signbit): New macro, if not already defined.
(Fcopysign): Use it instead of copysign.
(Fcopysign, syms_of_floatfns): Define the function on all platforms.
2017-03-07 08:32:04 -08:00
Paul Eggert
207ee94b1d Fix rounding error in ‘ceiling’ etc.
Without this fix, (ceiling most-negative-fixnum -1.0) returns
most-negative-fixnum instead of correctly signaling range-error,
and similarly for floor, round, and truncate.
* configure.ac (trunc): Add a check, since Gnulib’s doc says
‘trunc’ is missing from MSVC 9.  The Gnulib doc says ‘trunc’ is
also missing from some other older operating systems like Solaris
9 which I know we don’t care about any more, so MSVC is the only
reason to worry about ‘trunc’ here.
* src/editfns.c (styled_format): Formatting a float with %c is now an
error.  The old code did not work in general, because FIXNUM_OVERFLOW_P
had rounding errors.  Besides, the "if (FLOATP (...))" was in there
only as a result of my misunderstanding old code that I introduced
2011.  Although %d etc. is sometimes used on floats that represent
huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
happen with characters.
* src/floatfns.c (rounding_driver): Rework to do the right thing
when the intermediate result equals 2.305843009213694e+18, i.e.,
is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
Simplify so that only one section of code checks for overflow,
rather than two.
(double_identity): Remove.  All uses changed to ...
(emacs_trunc): ... this new function.  Add replacement for
platforms that lack ‘trunc’.
* src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
Make it clear that the arg cannot be floating point.
* test/src/editfns-tests.el (format-c-float): New test.
* test/src/floatfns-tests.el: New file, to test for this bug.
2017-03-01 12:47:28 -08:00
Glenn Morris
fc20bd940f Remove unused configure output variable
* configure.ac (GNULIB_MK):
* Makefile.in (gnulib_mk): Remove, no longer used.
2017-01-08 10:19:48 -08:00
Eli Zaretskii
10444dcf77 Generate nt/gnulib.mk from lib/gnulib.mk
This was proposed by Paul Eggert <eggert@cs.ucla.edu>,
with the purpose of avoiding manual maintenance of
nt/gnulib.mk.

* nt/gnulib-modules-to-delete.cfg: New file.
* nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1): New variables.
(${srcdir}/gnulib.mk): Rules to generate gnulib.mk from
lib/gnulib.mk and list of modules in gnulib-modules-to-delete.cfg.

* make-dist (nt): Add gnulib-modules-to-delete.cfg to the list of
files to link.
* configure.ac (GNULIB_MK): Compute the value according to $opsys.
* autogen.sh: Create nt/gnulib.mk if it doesn't exist, before
running autoreconf.
* Makefile.in (gnulib_mk): New variable.
($(srcdir)/nt/gnulib.mk): Rule to produce it.
(AUTOMAKE_INPUTS): Use $(gnulib_mk) instead of a literal file
name.
* .gitignore: Add nt/gnulib.mk.

* src/w32.c (acl_errno_valid): Implement it here, as we no longer
build the acl-permissions module from Gnulib.
2017-01-03 17:46:40 +02:00
Paul Eggert
65eee8392f Do not use Gnulib’s m4/wint_t.m4.
* admin/merge-gnulib: Remove m4/wint_t.m4 when merging.
Fix typo so that warn-on-use.m4 is removed too.
* configure.ac (gt_TYPE_WINT_T): New macro, replacing Gnulib’s.
* m4/wint_t.m4: Remove.
2017-01-01 02:35:36 -08:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
4f7a90bf6c Merge from origin/emacs-25
9adb101 Document 'describe-fontset'
229315c ; Add missing symbol quoting.
3d94931 Repair desktop restoration on text terminals
43022f9 Ignore forward-sexp-function in js-mode indentation code
b19fb49 Improve documentation of 'define-coding-system'
467768f Fix Bug#25162
6db78ae Fix a typo in define-abbrev-table
5f7d906 Bump makeinfo requirement from 4.7 to 4.13
442e2f6 Fixes related to select-enable-clipboard
e4ac450 Define struct predicate before acccesors
08decbd Doc fix for vc-git
5531e75 Further improve make-dist checking
953bf67 Improve previous make-dist change
129645a Make make-dist --snapshot do some sanity checks

# Conflicts:
#	lisp/menu-bar.el
2017-01-01 01:02:45 -08:00
Paul Eggert
2e2a806803 Fix copyright years by hand
These are dates that admin/update-copyright did not update, or
updated incorrectly.
2017-01-01 04:01:41 +00:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Nicolas Petton
e092f08515
Bump Emacs version to 25.1.91
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version.
* lisp/ldefs-boot.el: Update.
2016-12-30 15:38:03 +01:00
Paul Eggert
2dae636237 Use libpng-config --ldflags, not --libs
Problem reported by James K. Lowden (Bug#25268).
* configure.ac (LIBPNG): Pass --ldflags, not --libs, to libpng-config.
2016-12-24 17:03:53 -08:00
Glenn Morris
5f7d906e88 Bump makeinfo requirement from 4.7 to 4.13
* configure.ac: Bump makeinfo version requirement from 4.7 to 4.13.
We need at least 4.8, and that may be buggy, so go for the last
of the 4 series, which is 8 years old.  (Bug#25108)
2016-12-10 18:23:51 -08:00
Eli Zaretskii
de4624c99e Merge branch 'concurrency'
Conflicts (resolved):
	configure.ac
	src/Makefile.in
	src/alloc.c
	src/bytecode.c
	src/emacs.c
	src/eval.c
	src/lisp.h
	src/process.c
	src/regex.c
	src/regex.h
2016-12-04 19:59:17 +02:00