[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Emacs on 64-bit architectures

From: Pavel Janík
Subject: Emacs on 64-bit architectures
Date: Sun, 30 Sep 2001 12:12:45 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.107


this week, I have tried current CVS on two 64-bit machines both running
Linux kernel. There were no problems so far, but I have a small
question/request. I used to compile with -Wall to catch some minor
problems, and on these architectures (Alpha and IA-64) an integer/pointer
is 64-bit, and this is the source of problems in the following files:

keyboards.c, line 9255, function execute-extended-command
keyboards.c, line 9264 in the same function
data.c, line 2203, function number-to-string
print.c, line 1350, function print_object

In these files, you can find code like this:

  if (sizeof (int) == sizeof (EMACS_INT))
    sprintf (buffer, "%d", XINT (number));
  else if (sizeof (long) == sizeof (EMACS_INT))
    sprintf (buffer, "%ld", (long) XINT (number));

This if()'s are executed very often, so I think it would be better to make
this into #ifdef #elif #endif, so we compile/execute only the code which
has the chance to be run. In the next step we can define some macro to have
this only once in the code.

Other possible problems come from these lines:

keyboards.c, line 5791, function modify_event_symbol:
          sprintf (buf, "%s-%d", XSTRING (name_alist_or_stem)->data,
                   XINT (symbol_int) + 1);

print.c, line 1670, function print_object
          sprintf (buf, "%d", XBOOL_VECTOR (obj)->size);

print.c, line 1715, function print_object
          sprintf (buf, "%d", XFASTINT (XWINDOW (obj)->sequence_number));

print.c, line 1737, function print_object
              sprintf (buf, "%d/%d", XFASTINT (h->count),
                       XVECTOR (h->next)->size);

I can compile the code for you, if you do not have access to such
machines. Yes, I do not think this must be fixed before 21.1.
Pavel Janík

I just found a new primitive in the Emacs 21.0.987 pretest that
looks like it could help: hit-user-on-head-with-big-stick. Wow!
                  -- Someone in comp.emacs

reply via email to

[Prev in Thread] Current Thread [Next in Thread]