emacs-devel
[Top][All Lists]
Advanced

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

Re: Optimized gcc 4.3.0 build on Windows returns 0 secs for all time val


From: Juanma Barranquero
Subject: Re: Optimized gcc 4.3.0 build on Windows returns 0 secs for all time values of system-process-attributes
Date: Sat, 3 Jan 2009 18:14:05 +0100

On Sat, Jan 3, 2009 at 17:56, Eli Zaretskii <address@hidden> wrote:

> It's probably worth reporting that to the GCC mailing list, and/or
> file a bug report with them.

Yes, will do.

> Please install your change, but please try making the code more
> concise and clear, if possible.  For example, you could introduce a
> macro or an inline function for this repeated pattern:
>
>> +  tem1.LowPart = ft_kernel.dwLowDateTime;
>> +  tem1.HighPart = ft_kernel.dwHighDateTime;
>> +  tem1.QuadPart /= 10L;

The patch I was using locally already has two macros:

  #define CONVERT_TO_ULARGE(result, ft, div)   \
    do {                                       \
      (result).LowPart = (ft).dwLowDateTime;   \
      (result).HighPart = (ft).dwHighDateTime; \
      if (div)                                 \
        (result).QuadPart /= (div);            \
    } while (0)

  #define TO_LISP_OBJECT(time) ltime ((time).QuadPart / 1000000L,
(time).QuadPart % 1000000L)

so most conversions are like this:

 CONVERT_TO_ULARGE (tem1, ft_kernel, 10L);
 *stime = TO_LISP_OBJECT (tem1);

(better names are very welcome).

> In addition, please also change the other user of convert_time_raw
> similarly to this.

Yes, of course.

    Juanma




reply via email to

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