src/winsup/utils ChangeLog.64bit cygcheck.cc l ...
Eric Blake
eblake@redhat.com
Wed Feb 6 17:36:00 GMT 2013
On 02/06/2013 10:03 AM, corinna@cygwin.com wrote:
> CVSROOT: /cvs/src
> Module name: src
> Branch: cygwin-64bit-branch
> Changes by: corinna@sourceware.org 2013-02-06 17:03:49
>
> Modified files:
> winsup/utils : ChangeLog.64bit cygcheck.cc ldd.cc locale.cc
> mkgroup.c mkpasswd.c mount.cc passwd.c path.cc
> ssp.c strace.cc tzset.c
>
> Log message:
> Throughout, fix type problems on 32 and 64 bit. Except:
> * ssp.c: Disable entire functionality on x86_64 for now.
Out of curiosity, I looked at some of these changes.
> http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/utils/ldd.cc.diff?cvsroot=src&only_with_tag=cygwin-64bit-branch&r1=1.14&r2=1.14.2.1
#include <string.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include <wchar.h>
#include <locale.h>
#include <sys/cygwin.h>
@@ -162,7 +164,8 @@
wchar_t *buf = get_module_filename (GetCurrentProcess (), NULL);
if (!buf)
{
- printf ("ldd: GetModuleFileName returned an error %lu\n",
GetLastError ());
+ printf ("ldd: GetModuleFileName returned an error %" PRIu32 "\n",
+ (unsigned int) GetLastError ());
PRIu32 is for uint32_t, not unsigned int; and on platforms where
uint32_t is unsigned long, you've ended up causing a compiler warning.
If you are going to cast GetLastError(), then just use %u; no need to
drag in <inttypes.h>.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20130206/199c57fa/attachment.sig>
More information about the Cygwin-developers
mailing list