bug-coreutils
[Top][All Lists]
Advanced

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

module for PRI*MAX macros?


From: Eric Blake
Subject: module for PRI*MAX macros?
Date: Sat, 04 Mar 2006 16:23:45 -0700
User-agent: Thunderbird 1.5 (Windows/20051201)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I recently reported a findutils bug
(https://savannah.gnu.org/bugs/?func=detailitem&item_id=15472) where an
error message on cygwin was truncating ino_t (64 bits) because it was
using %ld (32 bits).  But James correctly reminded me that C89 does not
guarantee (long long) and %lld.  Is it time to make a gnulib module that
exposes what is currently done in coreutils' src/system.h to provide
PRIuMAX and friends on systems that lack them, so that it becomes possible
to portably print an ino_t value using:

ino_t ino = ...;
printf("inode %" PRIuMAX "\n", (uintmax_t) ino);

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFECiGA84KuGfSFAYARAiioAJ9D8F/aQxbyyo8+tu2mYkTfnu/MAgCdHLl4
ZooZOch9BdcGDc6E5RAHSJU=
=wJoR
-----END PGP SIGNATURE-----




reply via email to

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