One little thing I noticed in the Haiku port. I assume the lisp.h complication for pD was needed on 32-bit Haiku to avoid compiler warnings when passing long vs int (same size, either would work, but compiler warning). I installed the attached to simplify the ifdefs here. If my diagnosis of the issue is wrong and this patch doesn't work for Haiku, please let me know or feel free to revert and we can find a better way. At some point we can get rid of pD by replacing pD with "t" everywhere in Emacs, but one step at a time.