From a4cbeadf0c8a09095009f72c9ddfa8c403b1b3b3 Mon Sep 17 00:00:00 2001 From: obache Date: Sat, 3 Aug 2013 11:45:14 +0000 Subject: * BSD/OS and OSF/1 are also missing `z' modifier support for printf(3) format. * bare `zu' modifier is used, it should be replaced with `PRIzu` instead. Fixes crash with `pkg_admin rebuild' on platforms missing %z support, PR pkg/48070. --- pkgtools/pkg_install/files/admin/main.c | 6 +++--- pkgtools/pkg_install/files/configure | 2 +- pkgtools/pkg_install/files/configure.ac | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkg_install/files/admin/main.c b/pkgtools/pkg_install/files/admin/main.c index 56770ac3d4f..c688e944c2d 100644 --- a/pkgtools/pkg_install/files/admin/main.c +++ b/pkgtools/pkg_install/files/admin/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.61 2010/04/20 00:39:13 joerg Exp $ */ +/* $NetBSD: main.c,v 1.62 2013/08/03 11:45:14 obache Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include #endif -__RCSID("$NetBSD: main.c,v 1.61 2010/04/20 00:39:13 joerg Exp $"); +__RCSID("$NetBSD: main.c,v 1.62 2013/08/03 11:45:14 obache Exp $"); /*- * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. @@ -248,7 +248,7 @@ rebuild(void) iterate_pkg_db(add_pkg, &count); printf("\n"); - printf("Stored %" PRIzu " file%s and %zu explicit director%s" + printf("Stored %" PRIzu " file%s and %" PRIzu " explicit director%s" " from %"PRIzu " package%s in %s.\n", count.files, count.files == 1 ? "" : "s", count.directories, count.directories == 1 ? "y" : "ies", diff --git a/pkgtools/pkg_install/files/configure b/pkgtools/pkg_install/files/configure index b778ec7384e..c7c24d4b972 100755 --- a/pkgtools/pkg_install/files/configure +++ b/pkgtools/pkg_install/files/configure @@ -5034,7 +5034,7 @@ _ACEOF case $host in -*-*-hpux*) +*-*-bsdi*|*-*-hpux*|*-*-osf*) $as_echo "#define MISSING_SIZE_T_SUPPORT 1" >>confdefs.h diff --git a/pkgtools/pkg_install/files/configure.ac b/pkgtools/pkg_install/files/configure.ac index 544c6562543..25b5ae52476 100644 --- a/pkgtools/pkg_install/files/configure.ac +++ b/pkgtools/pkg_install/files/configure.ac @@ -1,4 +1,4 @@ -dnl $NetBSD: configure.ac,v 1.37 2013/02/10 12:46:56 obache Exp $ +dnl $NetBSD: configure.ac,v 1.38 2013/08/03 11:45:14 obache Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) AC_INIT([pkg_install], [20090911], [joerg@NetBSD.org]) @@ -133,7 +133,7 @@ AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(size_t, [#include ]) case $host in -*-*-hpux*) +*-*-bsdi*|*-*-hpux*|*-*-osf*) AC_DEFINE(MISSING_SIZE_T_SUPPORT) AH_TEMPLATE([MISSING_SIZE_T_SUPPORT], [ Define to 1 if the `z' modifider for printf is missing. -- cgit v1.2.3