aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid compilation warning in frame.cEli Zaretskii2019-08-231-1/+1
| | | | | * src/frame.c (Fx_parse_geometry): Avoid compilation warning about x and y being used without initializing them.
* ; Fix last change.Eli Zaretskii2019-08-231-1/+1
| | | | | * src/process.c (network_lookup_address_info_1): A better fix for compilation on platforms without HAVE_GAI_STRERROR. (Bug#37158)
* Fix compilation of process.cRobert Pluim2019-08-231-1/+1
| | | | | * src/process.c (network_lookup_address_info_1): [!HAVE_GAI_STRERROR]: Use make_fixnum instead of make_number. (Bug#37158).
* Get the Gnutls code compiling on Fedora 30Paul Eggert2019-08-232-38/+48
| | | | | | | | | | | | | | | | | | | | The recent changes caused the build to fail on Fedora 30 when built with --enable-gcc-warnings, among other things with diagnostics that gnutls_compression_get and gnutls_compression_get_name are deprecated (this started with GnuTLS 3.6). Fix this by refusing to call these obsolescent and now-dummy functions in GnuTLS 3.6 and later. However, this is just a temporary workaround to get the build working; a real fix is needed, as network-stream-tests fail. * src/gnutls.c (HAVE_GNUTLS_COMPRESSION_GET): New macro. (gnutls_compression_get, gnutls_compression_get_name): Define only if HAVE_GNUTLS_COMPRESSION_GET. (init_gnutls_functions): Load the two functions only if HAVE_GNUTLS_COMPRESSION_GET. (emacs_gnutls_certificate_export_pem): Use alloca instead of xmalloc. (Fgnutls_peer_status): Just return "NULL" if the functions are deprecated. (Fgnutls_format_certificate): Fix pointer signedness glitches. * src/process.c: Fix spacing.
* Move default face lookupRobert Pluim2019-08-231-5/+7
| | | | | * src/xdisp.c (extend_face_to_end_of_line): Move default face lookup lower.
* Fix recent changes in gnutls.cEli Zaretskii2019-08-231-4/+4
| | | | | | * src/gnutls.c: Fix typos that broke the MS-Windows build. (Fgnutls_peer_status_warning_describe): Fix incomplete error message string.
* Give a better error message when reading invalid "\unicode" escapes.Lars Ingebrigtsen2019-08-231-1/+2
| | | | | * src/lread.c (read_escape): Give a clearer error message on Unicode escape sequences (bug#36988).
* Merge remote-tracking branch 'origin/netsec'Lars Ingebrigtsen2019-08-232-17/+281
|\
| * fixup! Implement hostname->ip lookup functionRobert Pluim2019-08-073-41/+25
| |
| * Don't check unibyte hostnames for pure-ASCIIRobert Pluim2018-07-171-1/+1
| | | | | | | | | | | | | | | | * src/process.c (network_lookup_address_info_1): Only check multibyte hostnames for pure-ASCII. * test/src/process-tests.el (unibyte-domain-name): Test unibyte domain names with network-lookup-address-info.
| * Refactor getaddrinfo usageRobert Pluim2018-07-171-34/+50
| | | | | | | | | | | | | | | | | | * src/process.c: (network_lookup_address_info_1): New function, does most of the work to call getaddrinfo. Now checks hostname for pure-ASCII. (Fmake_network_process): Use it. (Fnetwork_lookup_address_info): Likewise. Error check family argument.
| * Implement hostname->ip lookup functionRobert Pluim2018-07-163-24/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/process.c (conv_sockaddr_to_lisp): Add include_port argument. Don't put a port in the result if this is false. (conv_addrinfo_to_lisp, Fprocess_datagram_address) (connect_network_socket, network_interface_list) (network_interface_info, server_accept_connection) (init_process_emacs): Update callers. (Fnetwork_lookup_address_info): New function. Performs hostname to ip address lookups. * src/w32.c (network_interface_get_info): Update callers of conv_sockaddr_to_lisp * etc/NEWS : mention addition of 'network-lookup-address-info'
| * Full certificate chain details for NSMJimmy Yuen Ho Wong2018-07-141-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/nsm.el (nsm-check-tls-connection): Fix issue with plural problems in message. Prefix every problem with a bullet. (nsm-query-user): Add new view the full certificate chain by pressing d. (nsm-format-certificate): Improve basic certificate and session info formatting. * src/gnutls.c (emacs_gnutls_certificate_export_pem): New function. (gnutls_certificate_details): Rename to emacs_gnutls_certificate_details. Add :pem to result list. (Fgnutls_format_certificate): New function for formatting a PEM to human-readable text.
| * Revamp Network Security manager checks for TLSJimmy Yuen Ho Wong2018-07-141-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/nsm.el (network-security-level, nsm-level, nsm-new-fingerprint-ok-p): Remove `paranoid' level and related code. * lisp/net/nsm.el (nsm-tls-checks, nsm-tls-check-version, nsm-tls-check-compression, nsm-tls-check-renegotiation-info-ext, nsm-tls-check-verify-cert, nsm-tls-check-same-cert, nsm-tls-check-null-suite, nsm-tls-check-export-kx, nsm-tls-check-anon-kx, nsm-tls-check-md5-sig, nsm-tls-check-rc4-cipher, nsm-tls-check-dhe-prime-kx, nsm-tls-check-sha1-sig, nsm-tls-check-ecdsa-cbc-cipher nsm-tls-check-dhe-kx, nsm-tls-check-rsa-kx, nsm-tls-check-3des-cipher, nsm-tls-check-cbc-cipher, nsm-save-fingerprint-maybe, nsm-tls-post-check-functions): New options and functions for checking TLS handshake problems. * lisp/net/nsm.el (nsm-check-certificate, network-security-protocol-checks, nsm-protocol-check--diffie-hellman-prime-bits, nsm-protocol-check--3des, nsm-protocol-check--rc4, nsm-protocol-check--signature-sha1, nsm-protocol-check--intermediate-sha1, nsm-protocol-check--ssl, nsm-check-protocol): Remove in favor of `nsm-tls-checks' and `nsm-tls-check-*' functions. * lisp/net/nsm.el (nsm-verify-connection): Ensure connection is checked even when `network-security-level' is `low'. * lisp/net/nsm.el (nsm-check-tls-connection): Batch all problems found before querying the user. * lisp/net/nsm.el (nsm--encryption): Renamed to `nsm-cipher-suite'. * lisp/net/nsm.el (nsm-fingerprint-ok-p): No longer prompt when certificate fingerprints mismatch. Returns a boolean instead when the fingerprint of the certificate received matches the saved fingerprints. * lisp/net/nsm.el (nsm-query): Change signature. Accepts a list of problems and a preformatted message instead of just a message format and the arguments for the message. * lisp/net/nsm.el (nsm-query-user): Change signature. Accepts a preformatted message and the peer status of the handshake instead of a message format, its arguments and the certificate for the host. * lisp/net/nsm.el (nsm-save-host): Change signature. Accepts a list of problems after the WHAT parameter. Saves multiple fingerprints for the same host in case the host load balances a TLS server with more than one certificates signed with different keys. Makes sure conditions are not removed when updating a fingerprint. * lisp/net/nsm.el (nsm-format-certificate): Display the TLS handshake's renegotiation info extension, compression level, encrypt-then-MAC extension, and key exchange prime bit length. * src/gnutls.c (gnutls-peer-status-warning-describe, gnutls-peer-status): Check for certificate verification problems introduced since GnuTLS 3.1. * src/gnutls.c (gnutls-peer-status): `:compression', `:encrypt-then-mac' and `:safe-renegotiation' are now contained in the peer status result return value.
* | Signal `invalid-read-syntax' for "trailing garbage"Lars Ingebrigtsen2019-08-231-1/+2
| | | | | | | | | | | | * src/minibuf.c (string_to_object): Signal `invalid-read-syntax' instead of the generic `error' for "trailing garbage following expression" (bug#24649).
* | Fix Qunbound-Qnil confusion in clrhash patchPaul Eggert2019-08-221-2/+5
| | | | | | | | | | | | Problem reported by Stefan Monnier. * src/fns.c (hash_clear): Fix typo I introduced in my previous patch here, by setting keys to Qunbound not Qnil.
* | Remove no-longer-needed workaround for GC bugPaul Eggert2019-08-211-3/+1
| | | | | | | | | | | | | | * src/keymap.c (describe_vector): Remove old workaround for GC bug. This workaround, introduced in 1993-02-19T05:43:54Z!rms@gnu.org, has not been needed for some time. Problem reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html
* | Don’t debug fset by defaultPaul Eggert2019-08-212-12/+5
| | | | | | | | | | | | | | | | | | | | | | This GC bug seems to have been fixed, so the check is no longer needed in production code. From a suggestion by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html * src/alloc.c (SUSPICIOUS_OBJECT_CHECKING) [!ENABLE_CHECKING]: Do not define. (find_suspicious_object_in_range, detect_suspicious_free): Expand to proper dummy expressions if !SUSPICIOUS_OBJECT_CHECKING. * src/data.c (Ffset): Convert test to an eassert.
* | Fix clrhash bug when hash table needs rehashingPaul Eggert2019-08-212-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html * src/fns.c (maybe_resize_hash_table): Prefer ASET to gc_aset where either will do. Simplify appending of Qunbound values. Put index_size calculation closer to where it’s needed. (hash_clear): If hash_rehash_needed_p (h), don’t clear the nonexistent hash vector. Use memclear to speed up clearing. * src/lisp.h (HASH_TABLE_SIZE): Check that the size is positive, and tell that to the compiler.
* | * src/buffer.c: Fix comment typo.Paul Eggert2019-08-211-1/+1
| |
* | Don’t hard-loop on cycles in ‘read’ etc.Paul Eggert2019-08-212-37/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem for ‘read’ reported by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00316.html * src/fns.c (Frequire): Protect against circular current-load-list. * src/lread.c (Fget_load_suffixes): Protect against circular load-suffixes or load-file-rep-suffixes. (Fload): Protect against circular loads-in-progress. (openp): Protect against circular PATH and SUFFIXES. (build_load_history): Protect against circular load-history or current-load-list. (readevalloop_eager_expand_eval): Protect against circular SUBFORMS. (read1): Protect against circular data. * test/src/lread-tests.el (lread-circular-hash): New test.
* | Fix the interactive spec for set-frame-width/heightLars Ingebrigtsen2019-08-211-2/+2
| | | | | | | | | | | | * src/frame.c (Fset_frame_width): (Fset_frame_height): Use `prefix-numeric-value' to get the proper numeric value (bug#9970).
* | ; Fix typos in commentary section of xdisp.cMartin Rudalics2019-08-211-2/+2
| |
* | Be more careful about pointers to bignum valsPaul Eggert2019-08-218-55/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses ‘const’ to be better at catching bugs that mistakenly attempt to modify a bignum value. Lisp bignums are supposed to be immutable. * src/alloc.c (make_pure_bignum): * src/fns.c (sxhash_bignum): Accept Lisp_Object instead of struct Lisp_Bignum *, as that’s simpler now. Caller changed. * src/bignum.h (bignum_val, xbignum_val): New inline functions. Prefer them to &i->value and XBIGNUM (i)->value, since they apply ‘const’ to the result. * src/timefns.c (lisp_to_timespec): Use mpz_t const * to point to a bignum value.
* | Update mini-gmpPaul Eggert2019-08-201-5/+5
| | | | | | | | | | * src/mini-gmp.c: Sync from upstream. This incorporates: 2019-08-13 Silence a couple of warnings
* | Avoid some excess precision in time arithmeticPaul Eggert2019-08-203-25/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/emacs-mime.texi (time-date): Adjust example to match new behavior. * etc/NEWS: Mention this. * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-second): Don’t lose underestimate precision of seconds component. * src/bignum.c (mpz): Grow by 1. * src/timefns.c (trillion_factor): New function. (timeform_sub_ps_p): Remove. (time_arith): Avoid unnecessarily-large hz, by reducing the hz to a value no worse than the worse hz of the two arguments. The result is always exact unless an error is signaled. * test/src/timefns-tests.el (timefns-tests--decode-time): New function. (format-time-string-with-zone): Test (decode-time LOOK ZONE t) resolution as well as its numeric value.
* | Support larger TIMEs in (time-convert TIME t)Paul Eggert2019-08-201-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, improve the doc to match current behavior. * doc/lispref/os.texi (Time Conversion): Document that time-convert signals an error for infinite or NaN args, and that (time-convert TIME t) is exact otherwise. Mention float-time as an alternative to time-convert. (Time Calculations): Document that time-add and time-subtract are exact and do not decrease HZ below the minimum of their args. * src/timefns.c (decode_float_time): Don’t signal an error for floating-point arguments whose base-FLT_RADIX exponent is not less than DBL_MANT_DIG. Instead, convert them to (TICKS . 1) values. Use two (instead of three) integer exponent comparisons in the typical case. * test/src/timefns-tests.el (time-arith-tests): Add more floating-point tests, including some tests that the old code fails.
* | Merge from origin/emacs-26Glenn Morris2019-08-202-25/+74
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0b810eb Fix a typo in char-width-table 3f00db7 Minor update in admin/notes/unicode bcd0115 Fix lisp indent infloop on unfinished strings (Bug#37045) 5f992d1 Improve commentary in composite.el 3a04be2 ; Improve commentary in xdisp.c 15de1d1 Fix markup in dired-x.texi bda7fc7 ; Fix typo in a doc string of speedbar.el 6f57ef9 * src/callproc.c (Fcall_process): Doc fix. # Conflicts: # doc/misc/dired-x.texi # lisp/international/characters.el # src/callproc.c
| * | ; Improve commentary in xdisp.cEli Zaretskii2019-08-171-24/+73
| | | | | | | | | | | | | | | * src/xdisp.c: Add to the commentary the description of stop_charpos, and how it is used during iteration.
| * | * src/callproc.c (Fcall_process): Doc fix.Eli Zaretskii2019-08-101-1/+1
| | |
| * | Ignore pending_signals when checking for quits.Philipp Stephani2019-08-072-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pending_signals is often set if no quit is pending. This results in bugs in module code if the module returns but no quit is actually pending. * src/emacs-module.c (module_should_quit): Use QUITP macro to check whether the caller should quit. * src/eval.c: Remove obsolete comment.
* | | Fix time-add/time-sub validity checkingPaul Eggert2019-08-191-3/+3
| | | | | | | | | | | | | | | | | | * src/timefns.c (time_arith): Check the first arg for validity even if the second arg is not finite. * test/src/timefns-tests.el (time-arith-tests): Test this.
* | | Allow set-frame-height/set-frame-width to be used interactivelyLars Ingebrigtsen2019-08-181-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/frames.texi (Frame Size): Document it. * src/frame.c (Fset_frame_height): (Fset_frame_width): Make into commands that use the numeric prefix to set height/width (bug#9970).
* | | Improve bignum_integer static checkingPaul Eggert2019-08-183-14/+14
| | | | | | | | | | | | | | | | | | | | | * src/bignum.h (bignum_integer): Now returns pointer-to-const, to catch trivial mistakes where the caller might try to modify a Lisp bignum. Lisp bignums are supposed to be immutable. All callers changed.
* | | Attempt to fix assertion violation in eval.cEli Zaretskii2019-08-181-1/+1
| | | | | | | | | | | | | | | * src/eval.c (Fautoload): Fix an assertion violation in make_fixnum. Reported by martin rudalics <rudalics@gmx.at>.
* | | Doc clarification for call-interactivelyLars Ingebrigtsen2019-08-171-2/+3
| | | | | | | | | | | | | | | * src/callint.c (Fcall_interactively): Be explicit about what we mean by "inquire" in the doc string (bug#15653).
* | | Have time-add etc. respect CURRENT_TIME_LIST tooPaul Eggert2019-08-171-3/+6
| | | | | | | | | | | | | | | * src/timefns.c (time_arith) [!CURRENT_TIME_LIST]: Don’t generate a list, since CURRENT_TIME_LIST is false.
* | | More-compatible subsecond calendrical timestampsPaul Eggert2019-08-161-73/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of appending a subseconds member to the result of ‘decode-time’, this keeps the format unchanged unless you give a new optional argument to ‘decode-time’. Also, the augmented format now puts the subsecond info in the SECONDS element, so the total number of elements is unchanged; this is more compatible with code that expects the traditional 9 elements, such as ‘(pcase decoded-time (`(,SEC ,MIN ,HOUR ,DAY ,MON ,YEAR ,DOW ,DST ,ZONE) ...) ...)’. * doc/lispref/os.texi, doc/misc/emacs-mime.texi, etc/NEWS: * lisp/net/soap-client.el (soap-decode-date-time): * lisp/simple.el (decoded-time): Document the new behavior. * lisp/calendar/icalendar.el (icalendar--decode-isodatetime): * lisp/calendar/iso8601.el (iso8601-parse) (iso8601-parse-time, iso8601-parse-duration) (iso8601--decoded-time): * lisp/calendar/parse-time.el (parse-time-string): * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-second): * lisp/org/org.el (org-parse-time-string): * lisp/simple.el (decoded-time): * src/timefns.c (Fdecode_time, Fencode_time): * test/lisp/calendar/icalendar-tests.el: (icalendar--decode-isodatetime): * test/lisp/calendar/iso8601-tests.el (test-iso8601-date-years) (test-iso8601-date-dates, test-iso8601-date-obsolete) (test-iso8601-date-weeks, test-iso8601-date-ordinals) (test-iso8601-time, test-iso8601-combined) (test-iso8601-duration, test-iso8601-intervals) (standard-test-dates, standard-test-time-of-day-fractions) (standard-test-time-of-day-beginning-of-day) (standard-test-time-of-day-utc) (standard-test-time-of-day-zone) (standard-test-date-and-time-of-day, standard-test-interval): * test/lisp/calendar/parse-time-tests.el (parse-time-tests): * test/src/timefns-tests.el (format-time-string-with-zone) (encode-time-dst-numeric-zone): Revert recent changes that added a SUBSECS member to calendrical timestamps, since that component is no longer present (the info, if any, is now in the SECONDS member). * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-second): Support fractional seconds in the new form. Simplify. * src/timefns.c (Fdecode_time): Support new arg FORM. (Fencode_time): Support subsecond resolution. * test/src/timefns-tests.el (format-time-string-with-zone) (decode-then-encode-time): Test subsecond calendrical timestamps.
* | | Subtracting “now” from “now” should yield zeroPaul Eggert2019-08-161-3/+13
| | | | | | | | | | | | | | | | | | * src/timefns.c (time_arith): Arrange for (time-subtract nil nil) to yield 0, to be consistent with (time-equal-p nil nil). * test/lisp/calendar/time-date-tests.el (test-time-since): New test.
* | | Fix time-add rounding bugPaul Eggert2019-08-161-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this fix, time arithmetic yielded results that were not mathematically accurate, even though the exact results were representable; for example, (time-add 0 1e-13) yielded a timestamp equal to 0 instead of to 1e-13. * lisp/timezone.el (timezone-time-from-absolute): Let time-add do its thing rather than using floating point internally, which has rounding errors. We now have bignums and so don’t need floating point to avoid overflow issues. * src/timefns.c (timeform_sub_ps_p): New function. (time_arith): If either argument is a float, represent the result exactly instead of discarding sub-ps info. * test/lisp/timezone-tests.el (timezone-tests-time-from-absolute): Don’t assume (HI LO US PS) timestamp format. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Don’t assume that time-add discards sub-ns info. * test/src/timefns-tests.el (time-rounding-tests): Add regression test to detect time-add rounding bug.
* | | Mention that text properties are removed in substitute-command-keysLars Ingebrigtsen2019-08-161-2/+2
| | | | | | | | | | | | | | | * src/doc.c (Fsubstitute_command_keys): Restore the bit in the doc string that mentions that text properties is removed (bug#17052).
* | | Mention what effect nil has as the prompt for read-event/char/etcLars Ingebrigtsen2019-08-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Reading One Event): Mention that "" has the same effect as nil as a prompt. * src/lread.c (Fread_event, Fread_char_exclusive, Fread_char): Mention what happens when PROMPT is nil/"" in the doc string (bug#15012).
* | | Fix typeof portability issue with bitfieldsPaul Eggert2019-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00300.html * src/lisp.h (lisp_h_make_fixnum): Use typeof (+(n)) instead of typeof (n), so that it works with compilers that do not allow typeof to be applied to a bitfield.
* | | Fix rounding errors with float timestampsPaul Eggert2019-08-151-78/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When converting from float to (TICKS . HZ) form, do the conversion exactly. When converting from (TICKS . HZ) form to float, round to even precisely. This way, successfully converting a float to (TICKS . HZ) and back yields a value numerically equal to the original. * src/timefns.c (flt_radix_power_size): New constant. (flt_radix_power): New static var. (decode_float_time): Convert the exact numeric value rather than guessing TIMESPEC_HZ resolution. (s_ns_to_double): Remove; no longer needed. (frac_to_double): New function. (decode_ticks_hz): It is now the caller’s responsibility to pass a valid TICKS and HZ. All callers changed. Use frac_to_double to round (TICKS . HZ) precisely. (decode_time_components): When decoding nil, use decode_ticks_hz since it rounds precisely. (syms_of_timefns): Initialize flt_radix_power. * test/src/timefns-tests.el (float-time-precision): New test.
* | | Debug out-of-range make_fixnum argsPaul Eggert2019-08-153-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With --enable-checking, make_fixnum (N) now checks that N is in fixnum range. Suggested by Pip Cet in: https://lists.gnu.org/r/emacs-devel/2019-07/msg00548.html A new function make_ufixnum (N) is for the rare cases where N is intended to be unsigned and is in the range 0..INTMASK. * configure.ac (AC_C_TYPEOF): Add. (HAVE_STATEMENT_EXPRESSIONS): Resurrect this macro. * src/fns.c (Frandom, hashfn_eq, hashfn_equal, hashfn_user_defined): * src/profiler.c (hashfn_profiler): Use make_ufixnum rather than make_fixum, since the argument is an unsigned integer in the range 0..INTMASK rather than a signed integer in the range MOST_NEGATIVE_FIXNUM..MOST_POSITIVE_FIXNUM. Typically this is for hashes. * src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]: Rename from lisp_h_make_fixnum. (lisp_h_make_fixnum): Redefine in terms of lisp_h_make_fixnum_wrap. Check for fixnum overflow on compilers like GCC that have statement expressions and typeof. (FIXNUM_OVERFLOW_P): Move up. (make_fixnum): Check for fixnum overflow. (make_ufixnum): New function, which checks that the arg fits into 0..INTMASK range.
* | | Fix some fixnum overflow problems in ccl.cPaul Eggert2019-08-151-12/+23
| | | | | | | | | | | | | | | * src/ccl.c (ccl_driver, Fccl_execute, Fccl_execute_on_string): Don’t assume CCL registers fit into fixnums.
* | | Remove INT_ADD_WRAPV bug workaroundsPaul Eggert2019-08-144-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (free_cons): * src/casefiddle.c (do_casify_multibyte_string): * src/editfns.c (styled_format): * src/image.c (png_load_body): Remove recent workarounds for INT_ADD_WRAPV bugs since the bugs have been fixed (Bug#37006).
* | | Don’t increase consing_until_gc when out of memoryPaul Eggert2019-08-131-1/+1
| | | | | | | | | | | | | | | * src/alloc.c (memory_full): Don’t increase consing_until_gc. Suggested by Eli Zaretskii (Bug#37006#46).
* | | Let consing_until_gc exceed EMACS_INT_MAXPaul Eggert2019-08-132-15/+9
| | | | | | | | | | | | | | | | | | | | | This builds on the previous patch. * src/alloc.c (consing_until_gc): Now of type intmax_t, since gc-cons-threshold can be up to INTMAX_MAX. All uses changed. * src/lisp.h (CONSING_CT_MAX, consing_ct): Remove.
* | | Let consing_until_gc exceed INTPTR_MAXPaul Eggert2019-08-132-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Eli Zaretskii (Bug#37006#46). * src/alloc.c (consing_until_gc): Now of type consing_ct. All uses changed, so gc-cons-threshold no longer saturates against OBJECT_CT_MAX. (object_ct): Move typedef here from lisp.h. * src/lisp.h (consing_ct, CONSING_CT_MAX): New type and macro. (OBJECT_CT_MAX): Remove. Replace all uses with CONSING_CT_MAX.