[21.4] Patch for consistent crash with Linux native sound on
AMD64
Stephen J. Turnbull
stephen at xemacs.org
Sat Dec 16 04:17:35 EST 2006
Aidan Kehoe writes:
>> The following patch fixes things for me and makes sense since prtn and rrtn
>> are later recast as a size_t.
> Yeah, there’s an unfortunate history with XEmacs and size_t,
That has nothing to do with this, though. The problem with size_t is
that it is a C library standard type that is diastrously badly
designed for use as a dimension type in user programs.
> so a question: does changing the declaration to long work as well?
As long as the size_t data is solely used to communicate with external
code such as device drivers, it's best to use size_t explicitly (and
probably document it with a comment). If it is going to get mixed
with XEmacs data, then it should be cast to EMACS_INT or perhaps
EMACS_UINT (the latter should be avoided, though). Typically this
should be done in a wrapper function (inline if there's need for speed).
More information about the XEmacs-Patches
mailing list