Sync with src: PRIu64 -> MY_PRIu64 + fallback value of PRIu64.

This commit is contained in:
joerg 2007-04-20 14:25:13 +00:00
parent c3b2d4b973
commit bbe0e4e1ae
3 changed files with 12 additions and 13 deletions

View file

@ -1,4 +1,4 @@
/* $NetBSD: perform.c,v 1.46 2007/04/20 13:36:25 tnn Exp $ */
/* $NetBSD: perform.c,v 1.47 2007/04/20 14:25:13 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@ -14,7 +14,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
__RCSID("$NetBSD: perform.c,v 1.46 2007/04/20 13:36:25 tnn Exp $");
__RCSID("$NetBSD: perform.c,v 1.47 2007/04/20 14:25:13 joerg Exp $");
#endif
#endif
@ -355,7 +355,7 @@ pkg_do(const char *pkg, lpkg_head_t *pkgs)
needed = 4 * (uint64_t) sb.st_size;
if (!inPlace && min_free(playpen) < needed) {
warnx("projected size of %" PRIu64 " bytes exceeds available free space\n"
warnx("projected size of %" MY_PRIu64 " bytes exceeds available free space\n"
"in %s. Please set your PKG_TMPDIR variable to point\n"
"to a location with more free space and try again.",
needed, playpen);

View file

@ -1,4 +1,4 @@
/* $NetBSD: show.c,v 1.13 2007/04/20 13:48:16 tnn Exp $ */
/* $NetBSD: show.c,v 1.14 2007/04/20 14:25:13 joerg Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
#else
__RCSID("$NetBSD: show.c,v 1.13 2007/04/20 13:48:16 tnn Exp $");
__RCSID("$NetBSD: show.c,v 1.14 2007/04/20 14:25:13 joerg Exp $");
#endif
#endif
@ -394,7 +394,7 @@ show_summary(package_t *plist, const char *binpkgfile)
var_copy_list(BUILD_INFO_FNAME, bi_vars);
if (binpkgfile != NULL && stat(binpkgfile, &st) == 0) {
printf("FILE_SIZE=%" PRIu64 "\n", (uint64_t)st.st_size);
printf("FILE_SIZE=%" MY_PRIu64 "\n", (uint64_t)st.st_size);
/* XXX: DIGETS */
}

View file

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.6 2007/04/16 12:55:35 joerg Exp $ */
/* $NetBSD: defs.h,v 1.7 2007/04/20 14:25:14 joerg Exp $ */
/*
* Copyright (c) 1999-2000 Alistair G. Crooks. All rights reserved.
@ -102,18 +102,17 @@
* a leading "%".
*/
#ifdef NEED_PRI_MACRO
# ifdef PRIu64
# undef PRIu64
# endif
# if SIZEOF_INT == 8
# define PRIu64 "u"
# define MY_PRIu64 "u"
# elif SIZEOF_LONG == 8
# define PRIu64 "lu"
# define MY_PRIu64 "lu"
# elif SIZEOF_LONG_LONG == 8
# define PRIu64 "llu"
# define MY_PRIu64 "llu"
# else
# error "unable to find a suitable PRIu64"
# endif
#else
# define MY_PRIu64 PRIu64
#endif
#endif /* !DEFS_H_ */