]> icculus.org git repositories - icculus/xz.git/commit
Use even more hackish way to support thousand separators.
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 29 Aug 2009 11:43:52 +0000 (14:43 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 29 Aug 2009 11:43:52 +0000 (14:43 +0300)
commit94c66b3297b3ad307eee93cf6b160e3c43997f11
treebc0f45c7d64a1788ab2e805bfa156d9f0c1197ab
parent3432e9c6aab851da1227b63dce645d7f190c04d8
Use even more hackish way to support thousand separators.

Seems that in addition on Windows and DOS, also OpenBSD
lacks support for %'d style printf() format strings.
So far that is the only modern POSIX-like system I know
with this problem, but after this hack, the thousand
separator shouldn't be a problem on any system.

Maybe testing if a format string like %'d produces
reasonable output is invoking undefined behavior on some
systems, but so far all the problematic systems I've tried
just print the raw format string (e.g. %'d prints 'd).

Maybe Autoconf test would have been better, but this
hack works also for cross-compilation, and avoids
recompilation in case the system libc starts to support
the thousand separator.
src/xz/util.c