Portability fiddles.
authorjbj <devnull@localhost>
Tue, 29 Feb 2000 23:22:44 +0000 (23:22 +0000)
committerjbj <devnull@localhost>
Tue, 29 Feb 2000 23:22:44 +0000 (23:22 +0000)
Rebuild with latest rpmmodule.so code.

CVS patchset: 3600
CVS date: 2000/02/29 23:22:44

lib/rpmmalloc.c
po/rpm.pot
rpm.spec
rpmio/rpmmalloc.c
rpmrc.in
scripts/freshen.sh

index 0e713d7..94167b6 100644 (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;
index efc1677..e96da2e 100644 (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
index 2a2e2cf..ff56a09 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -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
index 0e713d7..94167b6 100644 (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;
index 77bf1cd..5f78ae5 100644 (file)
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -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
 
index 31e3ecd..fd1f848 100755 (executable)
@@ -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