emacs-devel
[Top][All Lists]
Advanced

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

Re: Windows 64 port


From: Fabrice Popineau
Subject: Re: Windows 64 port
Date: Tue, 28 Feb 2012 22:00:37 +0100

The patch is too intrusive to the mainline code
and many of its changes should be omitted.

I maintain my point of view. Most of my patch is to ensure that 32bits and 64bits values are not mixed up, 
and that unsigned and signed values aren't either. Maybe some of it can be omitted, that doesn't mean one day
or another they won't be missed.

-      int i = 0, aligned = (intptr_t) ABLOCKS_BUSY (abase);
+      int i = 0;
+      intptr_t aligned = (intptr_t) ABLOCKS_BUSY (abase);

Here, the value of 'aligned' is either 0 or 1, so there's
no need to change its type.

Then

int aligned = (ABLOCKS_BUSY(abase) != NULL);

would have been cleaner.

The changes to src/m/amdx86-64.h would break GNU/Linux and
need to be backed out and redone.

Obviously, they need to be made dependent on the target platform.
(Done in the patch to come).
 
This mishandles Emacs integers outside the signed 32-bit range:

-#define XFASTINT(a) ((a) + 0)
+#define XFASTINT(a) ((int)((a) + 0))

Oops. Sorry for this one. It was a leftover.

There is something wrong around lib/strftime.c:946 
          if (negative_number)
            u_number_value = - u_number_value;

u_number_value being unsigned, this is wrong. I haven't look for a proper fix.

In src/dispnew.c:6402, height and width should probably be unsigned. The checking by
INT_ADD_RANGE_OVERFLOW results in a compiler warning about integral constant overflow
because it tries to compute (INTMIN - 2) which obviously is out of range. 
The value is not used in this case, but the compiler may emit the warning anyway.

Best regards,

--
Fabrice

reply via email to

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