Subject: bug#32338: 26.1; term.el broken on macOS

From: Constantine Vetoshev <[email-masked]>
Date: Sat, 29 Sep 2018 16:52:40 -0700

On Sat, Sep 22, 2018 at 10:42 PM Eli Zaretskii <[email-masked]> wrote:
> Thanks for your efforts.  I hope one of the NS experts will chime in
> soon.

After bisecting between 25.3 and 26.1, I tracked down the breaking
commit, 4cdd14eabe5a6121691daa2d9c5e814c5f53f3e5.

It seems like it was supposed to only impact Windows. I was so
surprised that I checked twice to confirm. The breaking change was to
src/emacs.c, in the type change from long to rlim_t (two places).
Reverting just that one file's change fixes the crash. I
double-checked by applying the relevant patch to the 26.1 release
source tree, and that fixed it.

Checking my (macOS) system, rlim_t seems to be typedefed to
__uint64_t, which definitely makes a difference, though I admit the
nature of the crash is rather mystifying compared to what has actually
changed. Eli, since you were working on this, any ideas about the
right approach to fixing the problem other than blindly reverting the
change?