emacs-devel
[Top][All Lists]
Advanced

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

Re: MS-Windows warnings (was build failure) for Emacs master


From: Davis Herring
Subject: Re: MS-Windows warnings (was build failure) for Emacs master
Date: Tue, 19 Apr 2016 09:46:43 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

As I understand it, though, MS-Windows defines GetLastError to return
unsigned int on 64-bit machines, and unsigned long on 32-bit machines
(!). This idiosyncrasy could be handled in the MS-Windows port by
something like this:

|#ifdef __MINGW64__ # define pDWORD "" #else # define pDWORD "l" #endif
and then the above code could be: printf ("Checking parent status
failed: %"pDWORD"u\n", GetLastError ()); |

I know the real problem has been addressed otherwise; however, surely for this sort of variability (between just these two types) one should simply write

printf ("Checking parent status failed: %lu\n",
        (unsigned long) GetLastError ());

without any preprocessor excitement.

Davis

--
This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.



reply via email to

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