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: Eli Zaretskii
Subject: Re: MS-Windows warnings (was build failure) for Emacs master
Date: Tue, 19 Apr 2016 19:04:38 +0300

> From: Davis Herring <address@hidden>
> Date: Tue, 19 Apr 2016 09:46:43 -0600
> Cc: address@hidden, Angelo Graziosi <address@hidden>
> 
> > 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.

If GetLastError returned a 64-bit value on 64-bit Windows, as Paul
thought, then your cast wouldn't be correct, of course, because
'unsigned long' is a 32-bit type on all versions of Windows.



reply via email to

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