summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-05-05 02:23:56 +0000
committerRichard M. Stallman <rms@gnu.org>1995-05-05 02:23:56 +0000
commitb818092206eeb9db5ab786a0d4166f9ff25bba16 (patch)
treeb29f975d26e242059bd4e93ab3acbe96a1dcea01 /src/print.c
parentd978068262f183364fabdb197880d86d53c1f974 (diff)
downloademacs-b818092206eeb9db5ab786a0d4166f9ff25bba16.tar.gz
(print): Make the printing understand EMACS_INTs
that are longs as well as ints.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c7
1 files changed, 6 insertions, 1 deletions
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;