- ppc: revert ppcmac to ppc.
- ppc: autoconf test for va_copy.
CVS patchset: 5015
CVS date: 2001/08/15 14:03:03
- fix: don't verify hash page nelem.
- better error messages for verification failures.
- include directory /usr/lib/rpm in rpm package.
+ - always use dl size in regionSwab() return.
+ - ppc: revert ppcmac to ppc.
+ - ppc: autoconf test for va_copy.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
/* Define as 1 if your zlib has gzseek() */
#undef HAVE_GZSEEK
+/* Define as 1 if your va_list type is an array */
+#undef HAVE_VA_LIST_AS_ARRAY
+
/* Define to the full path name of the bzip2 library (libbz2.a) */
#undef BZIP2LIB
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
+dnl Does this platform require array notation to assign to a va_list?
+dnl If cross-compiling, we assume va_list is "normal". If this breaks
+dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
+dnl also just to be sure.
+AC_MSG_CHECKING(whether va_list assignments need array notation)
+AC_CACHE_VAL(ac_cv_valistisarray,
+ [AC_TRY_RUN([#include <stdlib.h>
+ #include <stdarg.h>
+ void foo(int i, ...) {
+ va_list ap1, ap2;
+ va_start(ap1, i);
+ ap2 = ap1;
+ if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
+ { exit(1); }
+ va_end(ap1); va_end(ap2);
+ }
+ int main() { foo(0, 123); return(0); }],
+ [ac_cv_valistisarray=false],
+ [ac_cv_valistisarray=true],
+ [ac_cv_valistisarray=false])])
+
+if test "$ac_cv_valistisarray" = true ; then
+ AC_DEFINE(HAVE_VA_LIST_AS_ARRAY)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
RPMUSER=rpm
RPMUID=37
RPMGROUP=rpm
arch="`$RPM --eval '%{_arch}'`"
VENDOR="`$RPM --eval '%{_vendor}'`"
OS="`$RPM --eval '%{_os}'`"
-target_platform="`$RPM --eval '%{_target_platform}'`"
+RPMRC_GNU="`$RPM --eval '%{_gnu}'`"
+target_platform="`$RPM --eval '%{?_gnu:%undefine _gnu}%{_target_platform}'`"
target="`$RPM --eval '%{_target}'`"
rm -f ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${OS}
case "$arch" in
- i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_' ;;
+ i[3456]86) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_athlon_' ;;
alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;;
sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
- powerpc*|ppc*) 's_\(powerpc\|ppc\)_ppc_' ;;
+ powerpc*|ppc*) SUBSTS='s_\(powerpc\|ppc\)_ppc_' ;;
*) SUBSTS=y___ ;;
esac
base_arch=`echo $arch | sed -e 's_i?86_i386_;s_sparc.*_sparc_;s_alpha.*_alpha_;s_\(powerpc\|ppc\).*_ppc_'`
cat $PLATFORM \
| sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
-e "s,@RPMRC_ARCH@,$base_arch," \
+ -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
-e "s,@LIB@,$LIB," \
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
-e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \
*/
if (tl+REGION_TAG_COUNT == dl)
tl += REGION_TAG_COUNT;
+#if 0
if (tl > dl)
dl = tl;
+#endif
return dl;
}
rdlen += entry->info.count;
count = regionSwab(NULL, ril, 0, pe, t, 0);
- if (count != rdlen) goto errxit;
+ if (count != rdlen)
+ goto errxit;
} else {
te += entry->info.count + drlen;
count = regionSwab(NULL, ril, 0, pe, t, 0);
- if (count != (rdlen + entry->info.count + drlen)) goto errxit;
+ if (count != (rdlen + entry->info.count + drlen))
+ goto errxit;
}
/* Skip rest of entries in region. */
}
/* Insure that there are no memcpy underruns/overruns. */
- if (((char *)pe) != dataStart) goto errxit;
- if ((((char *)ei)+len) != te) goto errxit;
+ if (((char *)pe) != dataStart)
+ goto errxit;
+ if ((((char *)ei)+len) != te)
+ goto errxit;
if (lengthPtr)
*lengthPtr = len;
/** \ingroup header
* Dump a header in human readable format (for debugging).
* @param h header
- * @param flags 0 or HEADER_DUMP_LINLINE
+ * @param flags 0 or HEADER_DUMP_INLINE
* @param tags array of tag name/value pairs
*/
/*@unused@*/
else if ( (pvr == 0x36) || (pvr == 0x37) )
strcpy(un.machine, "ppciseries");
else
- strcpy(un.machine, "ppcmac");
+ strcpy(un.machine, "ppc");
}
# endif
/* take care of the case where the two version segments are */
/* different types: one numeric, the other alpha (i.e. empty) */
if (one == str1) return -1; /* arbitrary */
- if (two == str2) return 1;
+ if (two == str2) return -1;
if (isnum) {
/* this used to be done by converting the digit segments */
struct hdrObject_s {
PyObject_HEAD;
Header h;
- Header sigs;
+ Header sigs; /* XXX signature tags are in header */
char ** md5list;
char ** fileList;
char ** linkList;
int_32 * fileSizes;
int_32 * mtimes;
- int_32 * uids, * gids;
+ int_32 * uids, * gids; /* XXX these tags are not used anymore */
unsigned short * rdevs;
unsigned short * modes;
} ;
if (!PyArg_ParseTupleAndKeywords(args, keywords, "|i", kwlist, &legacy))
return NULL;
+ /* XXX this legacy switch is a hack, needs to be removed. */
if (legacy) {
Header h;
h = headerCopy(s->h);
len = headerSizeof(h, 0);
buf = headerUnload(h);
+/* XXX there's a missing headerFree(h); here */
} else {
len = headerSizeof(s->h, 0);
buf = headerUnload(s->h);
}
+/* XXX there's a missing check on buf == NULL here. */
rc = PyString_FromStringAndSize(buf, len);
free(buf);
return rc;
}
-/* Returns a list of these tuple for each part which failed:
-
- (attr_name, correctValue, currentValue)
-
- It should be passwd the file number to verify.
-*/
/** \ingroup python
+ * Returns a list of these tuples for each item that failed:
+ * (attr_name, correctValue, currentValue)
+ * It should be passed the file number to verify.
*/
static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) {
int fileNumber;
fileNumber = (int) PyInt_AsLong(args);
+ /* XXX this routine might use callbacks intelligently. */
if (rpmVerifyFile("", s->h, fileNumber, &verifyResult, RPMVERIFY_NONE)) {
Py_INCREF(Py_None);
return Py_None;
if (!verifyResult) return list;
+ /* XXX Legacy tag needs to go away. */
if (!s->fileList) {
headerGetEntry(s->h, RPMTAG_OLDFILENAMES, &type, (void **) &s->fileList,
&count);
Py_DECREF(tuple);
}
- /* RPMVERIFY_USER and RPM_VERIFY_GROUP are handled wrong here, but rpmlib.a
- doesn't do these correctly either. At least this is consistent. */
+ /*
+ * RPMVERIFY_USER and RPM_VERIFY_GROUP are handled wrong here, but rpmlib.a
+ * doesn't do these correctly either. At least this is consistent.
+ *
+ * XXX Consistent? rpmlib.a verifies user/group quite well, thank you.
+ * XXX The code below does nothing useful. FILEUSERNAME needs to be
+ * XXX retrieved and looked up.
+ */
if (verifyResult & RPMVERIFY_USER) {
if (!s->uids) {
headerGetEntry(s->h, RPMTAG_FILEUIDS, &type, (void **) &s->uids,
Py_DECREF(tuple);
}
+ /*
+ * XXX The code below does nothing useful. FILEGROUPNAME needs to be
+ * XXX retrieved and looked up.
+ */
if (verifyResult & RPMVERIFY_GROUP) {
if (!s->gids) {
headerGetEntry(s->h, RPMTAG_FILEGIDS, &type, (void **) &s->gids,
if (fileNames == NULL || count <= 0)
return;
+ /* XXX Legacy tag needs to go away. */
headerAddEntry(h, RPMTAG_OLDFILENAMES, RPM_STRING_ARRAY_TYPE,
fileNames, count);
return NULL;
}
+ /* XXX signature tags are appended to header, this API is gonna die */
if (!rpmPackageGetEntry(NULL, s->sigs, s->h, tag, &type, &data, &count))
{
Py_INCREF(Py_None);
PyMem_DEL(s);
}
-#ifndef DYINGSOON
+#ifndef DYINGSOON /* XXX OK, when? */
/**
*/
static int
/* RPMDBI_PACKAGES */
mi = rpmdbInitIterator(s->db, RPMDBI_PACKAGES, NULL, 0);
- /* XXX FIXME: unnecessary header mallocs are side effect here */
while (rpmdbNextIterator(mi) != NULL)
count++;
rpmdbFreeIterator(mi);
};
/** \ingroup python
+ * @todo Remove, there's no headerLink refcount on the pointer.
*/
static Header transactionSetHeader = NULL;
%ifos linux
%postun
/sbin/ldconfig
-if [ $1 == 0 ]; then
+if [ $1 = 0 ]; then
/usr/sbin/userdel rpm
/usr/sbin/groupdel rpm
fi
#include "rpmlog.h"
#include "debug.h"
+#ifndef va_copy
+# ifdef __va_copy
+# define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
+# else
+# ifdef HAVE_VA_LIST_AS_ARRAY
+# define va_copy(DEST,SRC) (*(DEST) = *(SRC))
+# else
+# define va_copy(DEST,SRC) ((DEST) = (SRC))
+# endif
+# endif
+#endif
+
/*@access rpmlogRec @*/
static int nrecs = 0;
/* Allocate a sufficently large buffer for output. */
while (1) {
-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
- /*@-unrecog@*/ nb = vsnprintf(msgbuf, msgnb, fmt, ap); /*@=unrecog@*/
-#else
va_list apc;
- /*@-sysunrecog -usedef@*/ __va_copy(apc, ap); /*@=sysunrecog =usedef@*/
+ /*@-sysunrecog -usedef@*/ va_copy(apc, ap); /*@=sysunrecog =usedef@*/
/*@-unrecog@*/ nb = vsnprintf(msgbuf, msgnb, fmt, apc); /*@=unrecog@*/
-#endif
if (nb > -1 && nb < msgnb)
break;
if (nb > -1) /* glibc 2.1 */
{ "fipsb",'\0', POPT_BIT_SET, &fips, 2, NULL, NULL },
{ "fipsc",'\0', POPT_BIT_SET, &fips, 3, NULL, NULL },
{ "debug",'d', POPT_ARG_VAL, &_rpmio_debug, -1, NULL, NULL },
+ POPT_AUTOHELP
POPT_TABLEEND
};
while ((rc = poptGetNextOpt(optCon)) > 0)
;
+ if (flags & RPMDIGEST_SHA1) flags &= ~RPMDIGEST_MD5;
reverse = (flags & RPMDIGEST_REVERSE);
if (fips) {
flags &= ~RPMDIGEST_MD5;
#/*! \page config_rpmrc Default configuration: /usr/lib/rpm/rpmrc
# \verbatim
#
-# $Id: rpmrc.in,v 2.43 2001/07/31 18:13:23 jbj Exp $
+# $Id: rpmrc.in,v 2.44 2001/08/15 14:03:03 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
optflags: ppc -O2 -fsigned-char
optflags: ppciseries -O2 -fsigned-char
optflags: ppcpseries -O2 -fsigned-char
-optflags: ppcmac -O2 -fsigned-char
optflags: parisc -O2 -mpa-risc-1-0
optflags: hppa1.0 -O2 -mpa-risc-1-0
arch_canon: ppc: ppc 5
arch_canon: ppciseries: ppciseries 5
arch_canon: ppcpseries: ppcpseries 5
-arch_canon: ppcmac: ppcmac 5
arch_canon: m68k: m68k 6
arch_canon: IP: sgi 7
buildarchtranslate: powerppc: ppc
buildarchtranslate: ppciseries: ppc
buildarchtranslate: ppcpseries: ppc
-buildarchtranslate: ppcmac: ppc
buildarchtranslate: atarist: m68kmint
buildarchtranslate: atariste: m68kmint
arch_compat: powerppc: ppc
arch_compat: ppciseries: ppc
arch_compat: ppcpseries: ppc
-arch_compat: ppcmac: ppc
arch_compat: ppc: rs6000
arch_compat: rs6000: noarch
buildarch_compat: ppciseries: noarch
buildarch_compat: ppcpseries: noarch
-buildarch_compat: ppcmac: noarch
buildarch_compat: ppc: noarch
buildarch_compat: mips: noarch
javadeps_SOURCES = javadeps.c
$(PROGRAMS): $(myLDADD)
+
+gnash.o: gnash.c
+ $(COMPILE) -o $@ -c gnash.c
+
+gnash: gnash.o
+ $(LINK) -all-static -o $@ gnash.o $(LDADD)
+