From: Richard M. Stallman Date: Fri, 5 May 1995 02:23:56 +0000 (+0000) Subject: (print): Make the printing understand EMACS_INTs X-Git-Tag: emacs-19.34~4161 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b818092206eeb9db5ab786a0d4166f9ff25bba16;p=emacs.git (print): Make the printing understand EMACS_INTs that are longs as well as ints. --- diff --git a/src/print.c b/src/print.c index 12da3b3b6d1..3609684c640 100644 --- a/src/print.c +++ b/src/print.c @@ -755,7 +755,12 @@ print (obj, printcharfun, escapeflag) switch (XGCTYPE (obj)) { case Lisp_Int: - sprintf (buf, "%d", XINT (obj)); + if (sizeof (int) == sizeof (EMACS_INT)) + sprintf (buf, "%d", XINT (obj)); + else if (sizeof (long) == sizeof (EMACS_INT)) + sprintf (buf, "%ld", XINT (obj)); + else + abort (); strout (buf, -1, printcharfun); break;