diff options
| author | Glenn Morris | 2018-10-09 13:12:55 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-10-09 13:12:55 -0700 |
| commit | b4e664f3a4222c0f95322fabd184a69f5dc953ed (patch) | |
| tree | 0e166b4928cf2b11fc4540c481eca0f72052a295 /src | |
| parent | 86b53729c0fda525a7c0a050fcdc8dea81c8eff1 (diff) | |
| parent | 86d2169ac3458412a084c7fc4047c3a389924cad (diff) | |
| download | emacs-b4e664f3a4222c0f95322fabd184a69f5dc953ed.tar.gz emacs-b4e664f3a4222c0f95322fabd184a69f5dc953ed.zip | |
Merge from origin/emacs-26
86d2169 Avoid ridiculously high stack limit requests on macOS
ac3622c Improve documentation of 'read-hide-char'
# Conflicts:
# src/emacs.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 5 | ||||
| -rw-r--r-- | src/minibuf.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/emacs.c b/src/emacs.c index b7a82793523..07df191035c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -881,7 +881,8 @@ main (int argc, char **argv) | |||
| 881 | newlim = rlim.rlim_max; | 881 | newlim = rlim.rlim_max; |
| 882 | newlim -= newlim % pagesize; | 882 | newlim -= newlim % pagesize; |
| 883 | 883 | ||
| 884 | if (pagesize <= newlim - lim) | 884 | if (newlim > lim /* in case rlim_t is an unsigned type */ |
| 885 | && pagesize <= newlim - lim) | ||
| 885 | { | 886 | { |
| 886 | rlim.rlim_cur = newlim; | 887 | rlim.rlim_cur = newlim; |
| 887 | if (setrlimit (RLIMIT_STACK, &rlim) == 0) | 888 | if (setrlimit (RLIMIT_STACK, &rlim) == 0) |
| @@ -890,6 +891,8 @@ main (int argc, char **argv) | |||
| 890 | } | 891 | } |
| 891 | /* If the stack is big enough, let regex-emacs.c use more of it | 892 | /* If the stack is big enough, let regex-emacs.c use more of it |
| 892 | before falling back to heap allocation. */ | 893 | before falling back to heap allocation. */ |
| 894 | if (lim < extra) | ||
| 895 | lim = extra; /* avoid wrap-around in unsigned subtraction */ | ||
| 893 | ptrdiff_t max_failures | 896 | ptrdiff_t max_failures |
| 894 | = min (lim - extra, min (PTRDIFF_MAX, SIZE_MAX)) / ratio; | 897 | = min (lim - extra, min (PTRDIFF_MAX, SIZE_MAX)) / ratio; |
| 895 | emacs_re_safe_alloca = max (max_failures * min_ratio, MAX_ALLOCA); | 898 | emacs_re_safe_alloca = max (max_failures * min_ratio, MAX_ALLOCA); |
diff --git a/src/minibuf.c b/src/minibuf.c index 751d6bda168..9395dc8df2f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -2058,8 +2058,11 @@ properties. */); | |||
| 2058 | 2058 | ||
| 2059 | DEFVAR_LISP ("read-hide-char", Vread_hide_char, | 2059 | DEFVAR_LISP ("read-hide-char", Vread_hide_char, |
| 2060 | doc: /* Whether to hide input characters in noninteractive mode. | 2060 | doc: /* Whether to hide input characters in noninteractive mode. |
| 2061 | It must be a character, which will be used to mask the input | 2061 | If non-nil, it must be a character, which will be used to mask the |
| 2062 | characters. This variable should never be set globally. */); | 2062 | input characters. This variable should never be set globally. |
| 2063 | |||
| 2064 | This variable also overrides the default character that `read-passwd' | ||
| 2065 | uses to hide passwords. */); | ||
| 2063 | Vread_hide_char = Qnil; | 2066 | Vread_hide_char = Qnil; |
| 2064 | 2067 | ||
| 2065 | defsubr (&Sactive_minibuffer_window); | 2068 | defsubr (&Sactive_minibuffer_window); |