[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs server fails to start with large uid on unix
From: |
Stefan Monnier |
Subject: |
Re: emacs server fails to start with large uid on unix |
Date: |
Sun, 07 Jan 2007 20:12:42 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) |
> I have a large unix uid:
> $ id
> uid=800154870(ruttbe) gid=705(www)
> it seems the emacs server of pretest 92 can't cope with this, possibly
> b/c of the limit on emacs lisp's integer size. perhaps calc should be
> used, as it can handle bignums? also `file-attributes' may have a problem
> with this large UID. see the backtrace upon M-x
> server-start after an emacs -q:
I don't know if the patch below fixes your problem, but it should at least
solve one part.
Should I install it?
Stefan
--- orig/src/editfns.c
+++ mod/src/editfns.c
@@ -3604,7 +3604,12 @@
if (*format != 'd' && *format != 'o' && *format != 'x'
&& *format != 'i' && *format != 'X' && *format != 'c')
error ("Invalid format operation %%%c", *format);
- args[n] = Ftruncate (args[n], Qnil);
+ /* This fails unnecessarily if args[n] is bigger than
+ most-positive-fixnum but smaller than MAXINT.
+ These cases are important because we sometimes use floats
+ to represent such integer values (typically such values
+ come from UIDs or PIDs). */
+ /* args[n] = Ftruncate (args[n], Qnil); */
}
/* Note that we're using sprintf to print floats,
@@ -3772,8 +3777,13 @@
else
sprintf (p, this_format, XUINT (args[n]));
}
- else
+ else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] ==
'g')
sprintf (p, this_format, XFLOAT_DATA (args[n]));
+ else if (format[-1] == 'd')
+ sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n]));
+ else
+ /* Don't sign-extend for octal or hex printing. */
+ sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n]));
if (p > buf
&& multibyte
- emacs server fails to start with large uid on unix, Benjamin Rutt, 2007/01/07
- Re: emacs server fails to start with large uid on unix,
Stefan Monnier <=
- Re: emacs server fails to start with large uid on unix, Richard Stallman, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Benjamin Rutt, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Stefan Monnier, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Benjamin Rutt, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Stefan Monnier, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Richard Stallman, 2007/01/08
- Re: emacs server fails to start with large uid on unix, Stefan Monnier, 2007/01/13
- Re: emacs server fails to start with large uid on unix, Benjamin Rutt, 2007/01/19