To avoid the defs.h to disappear again, change users of PRIu64 to

MY_PRIu64 and define that to PRIu64 by default.
This commit is contained in:
joerg 2007-04-20 14:22:25 +00:00
parent c370d31c5a
commit 5149c83981
3 changed files with 12 additions and 13 deletions

View File

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

View File

@ -1,4 +1,4 @@
/* $NetBSD: show.c,v 1.35 2007/04/20 14:03:15 tnn Exp $ */ /* $NetBSD: show.c,v 1.36 2007/04/20 14:22:25 joerg Exp $ */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -11,7 +11,7 @@
#if 0 #if 0
static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp"; static const char *rcsid = "from FreeBSD Id: show.c,v 1.11 1997/10/08 07:47:38 charnier Exp";
#else #else
__RCSID("$NetBSD: show.c,v 1.35 2007/04/20 14:03:15 tnn Exp $"); __RCSID("$NetBSD: show.c,v 1.36 2007/04/20 14:22:25 joerg Exp $");
#endif #endif
#endif #endif
@ -394,7 +394,7 @@ show_summary(package_t *plist, const char *binpkgfile)
var_copy_list(BUILD_INFO_FNAME, bi_vars); var_copy_list(BUILD_INFO_FNAME, bi_vars);
if (binpkgfile != NULL && stat(binpkgfile, &st) == 0) { 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 */ /* XXX: DIGETS */
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.3 2006/04/24 13:36:23 dillo Exp $ */ /* $NetBSD: defs.h,v 1.4 2007/04/20 14:22:26 joerg Exp $ */
/* /*
* Copyright (c) 1999-2000 Alistair G. Crooks. All rights reserved. * Copyright (c) 1999-2000 Alistair G. Crooks. All rights reserved.
@ -102,18 +102,17 @@
* a leading "%". * a leading "%".
*/ */
#ifdef NEED_PRI_MACRO #ifdef NEED_PRI_MACRO
# ifdef PRIu64
# undef PRIu64
# endif
# if SIZEOF_INT == 8 # if SIZEOF_INT == 8
# define PRIu64 "u" # define MY_PRIu64 "u"
# elif SIZEOF_LONG == 8 # elif SIZEOF_LONG == 8
# define PRIu64 "lu" # define MY_PRIu64 "lu"
# elif SIZEOF_LONG_LONG == 8 # elif SIZEOF_LONG_LONG == 8
# define PRIu64 "llu" # define MY_PRIu64 "llu"
# else # else
# error "unable to find a suitable PRIu64" # error "unable to find a suitable PRIu64"
# endif # endif
#else
# define MY_PRIu64 PRIu64
#endif #endif
#endif /* !DEFS_H_ */ #endif /* !DEFS_H_ */