diff options
author | jbj <devnull@localhost> | 2000-02-29 23:22:44 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2000-02-29 23:22:44 +0000 |
commit | 8aceebd817c77792eea840ec5585264e023b13f4 (patch) | |
tree | 5fce6062037a9eb11b7545f1c1f224f87b200258 | |
parent | 968b07939a883a54b17cc35702e93a0191bfb374 (diff) | |
download | rpm-8aceebd817c77792eea840ec5585264e023b13f4.tar.gz rpm-8aceebd817c77792eea840ec5585264e023b13f4.tar.bz2 rpm-8aceebd817c77792eea840ec5585264e023b13f4.zip |
Portability fiddles.
Rebuild with latest rpmmodule.so code.
CVS patchset: 3600
CVS date: 2000/02/29 23:22:44
-rw-r--r-- | lib/rpmmalloc.c | 15 | ||||
-rw-r--r-- | po/rpm.pot | 5 | ||||
-rw-r--r-- | rpm.spec | 2 | ||||
-rw-r--r-- | rpmio/rpmmalloc.c | 15 | ||||
-rw-r--r-- | rpmrc.in | 4 | ||||
-rwxr-xr-x | scripts/freshen.sh | 5 |
6 files changed, 31 insertions, 15 deletions
diff --git a/lib/rpmmalloc.c b/lib/rpmmalloc.c index 0e713d712..94167b650 100644 --- a/lib/rpmmalloc.c +++ b/lib/rpmmalloc.c @@ -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; diff --git a/po/rpm.pot b/po/rpm.pot index efc16776c..e96da2e9e 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -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 @@ -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 diff --git a/rpmio/rpmmalloc.c b/rpmio/rpmmalloc.c index 0e713d712..94167b650 100644 --- a/rpmio/rpmmalloc.c +++ b/rpmio/rpmmalloc.c @@ -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; @@ -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 diff --git a/scripts/freshen.sh b/scripts/freshen.sh index 31e3ecd70..fd1f848fe 100755 --- a/scripts/freshen.sh +++ b/scripts/freshen.sh @@ -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 |