Portability fiddles.

Rebuild with latest rpmmodule.so code.

CVS patchset: 3600
CVS date: 2000/02/29 23:22:44
This commit is contained in:
jbj 2000-02-29 23:22:44 +00:00
parent 968b07939a
commit 8aceebd817
6 changed files with 31 additions and 15 deletions

View File

@ -2,7 +2,7 @@
void *vmefail(void)
{
fprintf(stderr, _("virtual memory exhausted.\n"));
fprintf(stderr, _("memory alloc returned NULL.\n"));
exit(EXIT_FAILURE);
/*@notreached@*/
return NULL;
@ -12,7 +12,9 @@ void *vmefail(void)
void * xmalloc (size_t size)
{
register void *value = malloc (size);
register void *value;
if (size == 0) size++;
value = malloc (size);
if (value == 0)
value = vmefail();
return value;
@ -20,7 +22,10 @@ void * xmalloc (size_t size)
void * xcalloc (size_t nmemb, size_t size)
{
register void *value = calloc (nmemb, size);
register void *value;
if (size == 0) size++;
if (nmemb == 0) nmemb++;
value = calloc (nmemb, size);
if (value == 0)
value = vmefail();
return value;
@ -28,7 +33,9 @@ void * xcalloc (size_t nmemb, size_t size)
void * xrealloc (void *ptr, size_t size)
{
register void *value = realloc (ptr, size);
register void *value;
if (size == 0) size++;
value = realloc (ptr, size);
if (value == 0)
value = vmefail();
return value;

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-02-27 18:06-0500\n"
"POT-Creation-Date: 2000-02-29 18:19-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1235,8 +1235,7 @@ msgid "cannot re-open payload: %s\n"
msgstr ""
#: build/build.c:110 build/pack.c:312
#, c-format
msgid "Unable to open temp file %s."
msgid "Unable to open temp file."
msgstr ""
#: build/build.c:189

View File

@ -2,7 +2,7 @@ Summary: The Red Hat package management system.
Name: rpm
%define version 3.0.4
Version: %{version}
Release: 0.45
Release: 0.46
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/rpm-%{version}.tar.gz
Copyright: GPL

View File

@ -2,7 +2,7 @@
void *vmefail(void)
{
fprintf(stderr, _("virtual memory exhausted.\n"));
fprintf(stderr, _("memory alloc returned NULL.\n"));
exit(EXIT_FAILURE);
/*@notreached@*/
return NULL;
@ -12,7 +12,9 @@ void *vmefail(void)
void * xmalloc (size_t size)
{
register void *value = malloc (size);
register void *value;
if (size == 0) size++;
value = malloc (size);
if (value == 0)
value = vmefail();
return value;
@ -20,7 +22,10 @@ void * xmalloc (size_t size)
void * xcalloc (size_t nmemb, size_t size)
{
register void *value = calloc (nmemb, size);
register void *value;
if (size == 0) size++;
if (nmemb == 0) nmemb++;
value = calloc (nmemb, size);
if (value == 0)
value = vmefail();
return value;
@ -28,7 +33,9 @@ void * xcalloc (size_t nmemb, size_t size)
void * xrealloc (void *ptr, size_t size)
{
register void *value = realloc (ptr, size);
register void *value;
if (size == 0) size++;
value = realloc (ptr, size);
if (value == 0)
value = vmefail();
return value;

View File

@ -1,4 +1,4 @@
# $Id: rpmrc.in,v 2.17 2000/02/25 16:29:44 jbj Exp $
# $Id: rpmrc.in,v 2.18 2000/02/29 23:22:44 jbj Exp $
#############################################################
@ -214,7 +214,7 @@ os_compat: hpux10.00: hpux9.07
os_compat: hpux9.07: hpux9.05
os_compat: hpux9.05: hpux9.04
os_compat: osf4.0: osf3.2
os_compat: osf4.0: osf3.2 osf1
os_compat: ncr-sysv4.3: ncr-sysv4.2

View File

@ -37,7 +37,10 @@ for n in $*; do
if [ ! -f $n ]; then
args="$args $n"
else
if ! rpm -q `rpm -qp $n` >/dev/null 2>&1; then
if rpm -q `rpm -qp $n` >/dev/null 2>&1
then
;
else
name=`rpm --qf "%{NAME}" -qp $n`
$RPM -q $name >/dev/null 2>&1 && args="$args $n"
fi