[CVS] RPM: rpm/rpmdb/ merge.c rpm/rpmio/ fts.c rpmhook.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 09:24:28 Branch: HEAD Handle: 2007071908242700 Modified files: rpm/rpmdb merge.c rpm/rpmio fts.c rpmhook.c Log: Include "debug.h" in three files where it is missing. This is in order to get the DMalloc function overloading there, too. Summary: RevisionChanges Path 1.8 +2 -0 rpm/rpmdb/merge.c 1.19+1 -0 rpm/rpmio/fts.c 1.6 +1 -0 rpm/rpmio/rpmhook.c patch -p0 <<'@@ .' Index: rpm/rpmdb/merge.c $ cvs diff -u -r1.7 -r1.8 merge.c --- rpm/rpmdb/merge.c 10 Jul 2007 17:03:34 - 1.7 +++ rpm/rpmdb/merge.c 19 Jul 2007 07:24:27 - 1.8 @@ -57,6 +57,8 @@ #include "rpmdb.h" +#include "debug.h" + #define ISIZE sizeof(int) #define PSIZE sizeof(unsigned char *) #define ICOPY_LIST(src, dst, last) \ @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/fts.c $ cvs diff -u -r1.18 -r1.19 fts.c --- rpm/rpmio/fts.c 17 Jul 2007 18:14:23 - 1.18 +++ rpm/rpmio/fts.c 19 Jul 2007 07:24:27 - 1.19 @@ -100,6 +100,7 @@ #include "fts.h" #include "rpmio.h" #include "rpmurl.h" +#include "debug.h" # define __set_errno(val) (*__errno_location ()) = (val) # define __openopen # define __close close @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rpmhook.c $ cvs diff -u -r1.5 -r1.6 rpmhook.c --- rpm/rpmio/rpmhook.c 9 Oct 2004 17:29:22 - 1.5 +++ rpm/rpmio/rpmhook.c 19 Jul 2007 07:24:27 - 1.6 @@ -7,6 +7,7 @@ #include #include +#include "debug.h" #define RPMHOOK_TABLE_INITSIZE 256 #define RPMHOOK_BUCKET_INITSIZE 5 @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ INSTALL
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 10:37:48 Branch: HEAD Handle: 2007071909374800 Modified files: rpm INSTALL Log: document how RPM 5 can be debugged with DMalloc Summary: RevisionChanges Path 2.35+58 -0 rpm/INSTALL patch -p0 <<'@@ .' Index: rpm/INSTALL $ cvs diff -u -r2.34 -r2.35 INSTALL --- rpm/INSTALL 17 Jul 2007 07:25:05 - 2.34 +++ rpm/INSTALL 19 Jul 2007 08:37:48 - 2.35 @@ -283,6 +283,64 @@ implementation please at least make sure that the above issues are still taken care of and especially test it under _different_ Unix flavors. +DEBUGGING += + +Memory Allocation Debugging with DMalloc + + +1. Install DMalloc into /path/to/dmalloc + +2. Build RPM with at least: + + $ ./configure [...] + --prefix=/tmp/rpm \ + --with-dmalloc=/path/to/dmalloc + [...] + $ make + $ make install + +3. Create a ~/.dmallocrc containing: + + # no debugging + nonenone + + # basic debugging + debug1 log-stats, log-non-free, check-fence + + # more logging and some heap checking + debug2 log-stats, log-non-free, check-fence, \ + log-trans, check-heap + + # good utilities + debug3 log-stats, log-non-free, check-fence, \ + log-trans, check-heap, \ + log-admin, realloc-copy, free-blank + + # even more good utilities + debug4 log-stats, log-non-free, check-fence, \ + log-trans, check-heap, \ + log-admin, realloc-copy, free-blank, \ + log-bad-space, log-nonfree-space + +4. Enable dmalloc debugging with: + + $ dmalloc -l dmalloc.log + $ dmalloc debug3 + +5. Run RPM: + + $ /tmp/rpm/bin/rpm [...] + +6. Inspect the results: + (notice that some used functions like gethostbyname(3) or dirname(3) + from the vendor libc inherently leak memory because of their API + style and because libc isn't DMalloc instrumented you will often see + some memory leaks reported without any source location -- just be not + confused) + + $ vi dmalloc.log + OS DEPENDENCIES === @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ .dmalloc.bashrc .dmallocrc INSTALL
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 10:46:40 Branch: HEAD Handle: 2007071909464000 Added files: rpm .dmalloc.bashrc .dmallocrc Modified files: rpm INSTALL Log: make the DMalloc stuff more easy and out-of-the-box usable Summary: RevisionChanges Path 2.1 +10 -0 rpm/.dmalloc.bashrc 2.1 +25 -0 rpm/.dmallocrc 2.36+4 -26 rpm/INSTALL patch -p0 <<'@@ .' Index: rpm/.dmalloc.bashrc $ cvs diff -u -r0 -r2.1 .dmalloc.bashrc --- /dev/null 2007-07-19 10:45:04 +0200 +++ .dmalloc.bashrc 2007-07-19 10:46:40 +0200 @@ -0,0 +1,10 @@ +## +## .dmalloc.bashrc -- DMalloc GNU bash glue +## + +__dmallocrc="`pwd`/.dmallocrc" + +dmalloc () { +eval `command dmalloc -b -f ${__dmallocrc} ${1+"$@"}` +} + @@ . patch -p0 <<'@@ .' Index: rpm/.dmallocrc $ cvs diff -u -r0 -r2.1 .dmallocrc --- /dev/null 2007-07-19 10:45:04 +0200 +++ .dmallocrc2007-07-19 10:46:40 +0200 @@ -0,0 +1,25 @@ +## +## .dmallocrc -- DMalloc configuration +## + +# no debugging +nonenone + +# basic debugging +debug1 log-stats, log-non-free, check-fence + +# more logging and some heap checking +debug2 log-stats, log-non-free, check-fence, \ +log-trans, check-heap + +# good utilities +debug3 log-stats, log-non-free, check-fence, \ +log-trans, check-heap, \ +log-admin, realloc-copy, free-blank + +# even more good utilities +debug4 log-stats, log-non-free, check-fence, \ +log-trans, check-heap, \ +log-admin, realloc-copy, free-blank, \ +log-bad-space, log-nonfree-space + @@ . patch -p0 <<'@@ .' Index: rpm/INSTALL $ cvs diff -u -r2.35 -r2.36 INSTALL --- rpm/INSTALL 19 Jul 2007 08:37:48 - 2.35 +++ rpm/INSTALL 19 Jul 2007 08:46:40 - 2.36 @@ -300,39 +300,17 @@ $ make $ make install -3. Create a ~/.dmallocrc containing: - - # no debugging - nonenone - - # basic debugging - debug1 log-stats, log-non-free, check-fence - - # more logging and some heap checking - debug2 log-stats, log-non-free, check-fence, \ - log-trans, check-heap - - # good utilities - debug3 log-stats, log-non-free, check-fence, \ - log-trans, check-heap, \ - log-admin, realloc-copy, free-blank - - # even more good utilities - debug4 log-stats, log-non-free, check-fence, \ - log-trans, check-heap, \ - log-admin, realloc-copy, free-blank, \ - log-bad-space, log-nonfree-space - -4. Enable dmalloc debugging with: +3. Enable dmalloc debugging with: + $ . .dmalloc.bashrc $ dmalloc -l dmalloc.log $ dmalloc debug3 -5. Run RPM: +4. Run RPM: $ /tmp/rpm/bin/rpm [...] -6. Inspect the results: +5. Inspect the results: (notice that some used functions like gethostbyname(3) or dirname(3) from the vendor libc inherently leak memory because of their API style and because libc isn't DMalloc instrumented you will often see @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 10:48:01 Branch: HEAD Handle: 2007071909480100 Modified files: rpm devtool.conf Log: enable debugging instrumentation by default for %standalone Summary: RevisionChanges Path 2.46+1 -0 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.45 -r2.46 devtool.conf --- rpm/devtool.conf 18 Jul 2007 07:36:56 - 2.45 +++ rpm/devtool.conf 19 Jul 2007 08:48:01 - 2.46 @@ -542,6 +542,7 @@ --without-python \ --without-apidocs \ --enable-build-warnings \ +--enable-build-debug \ --disable-build-lib64 \ --disable-shared \ --disable-rpath \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ configure.ac
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 14:44:13 Branch: HEAD Handle: 2007071913441300 Modified files: rpm configure.ac Log: enable some warnings also for Sun Studio and Intel C/C++ compilers Summary: RevisionChanges Path 2.205 +8 -1 rpm/configure.ac patch -p0 <<'@@ .' Index: rpm/configure.ac $ cvs diff -u -r2.204 -r2.205 configure.ac --- rpm/configure.ac 19 Jul 2007 06:39:57 - 2.204 +++ rpm/configure.ac 19 Jul 2007 12:44:13 - 2.205 @@ -88,9 +88,16 @@ AS_HELP_STRING([--enable-build-warnings], [build RPM with extra compiler warnings turned on (GCC only)]), [dnl if test ".$enableval" = .yes; then if test ".$ac_cv_c_compiler_gnu" = .yes; then +dnl # GNU GCC (usually "gcc") CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" +elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then +dnl # Sun Studio (usually "cc") +CFLAGS="$CFLAGS -v" +elif test ".`$CC -help 2>&1 | grep 'Intel Corporation'`" != .; then +dnl # Intel C/C++ Compiler (usually "icc") +CFLAGS="$CFLAGS -Wall -Wcheck" else -AC_MSG_WARN([--enable-build-warnings requires GCC]) +AC_MSG_WARN([--enable-build-warnings requires GCC, Sun Studio or Intel C/C++]) fi fi ]) @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 15:47:34 Branch: HEAD Handle: 2007071914473400 Modified files: rpm devtool.conf Log: fix copy & paste error in output Summary: RevisionChanges Path 2.47+1 -1 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.46 -r2.47 devtool.conf --- rpm/devtool.conf 19 Jul 2007 08:48:01 - 2.46 +++ rpm/devtool.conf 19 Jul 2007 13:47:34 - 2.47 @@ -442,7 +442,7 @@ # File if [ ! -d "$base3rd/bin/$platform/file-${v_file}" ]; then -echo "++ building third-party library lua-${v_file}" +echo "++ building third-party library file-${v_file}" ( cd $base3rd/bin/$platform rm -rf file-${v_file} gunzip <../../src/file-${v_file}.tar.gz | tar xf - @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 15:49:12 Branch: HEAD Handle: 2007071914491200 Modified files: rpm devtool.conf Log: move the compiler determination to the global scope so all components are built with the same compiler (mixing GCC and Sun Studio at least failed for me when it comes to math functions GCC references in its libgcc); fix path to OpenSSL library to resolve Neon detection problem Summary: RevisionChanges Path 2.48+19 -11 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.47 -r2.48 devtool.conf --- rpm/devtool.conf 19 Jul 2007 13:47:34 - 2.47 +++ rpm/devtool.conf 19 Jul 2007 13:49:12 - 2.48 @@ -210,6 +210,22 @@ prefix="/tmp/rpm" platform=`shtool platform -n -L -S "" -C "+" -F '%-%'` +# determine compiler (to make sure the whole library and application +# chain is built with the same one in order to avoid incompatibilities) +export CC +if [ ".$CC" != . ]; then +: +if [ ".`(which gcc) 2>/dev/null | grep -v '^no'`" != . ]; then +CC="gcc" +elif [ ".`(which icc) 2>/dev/null | grep -v '^no'`" != . ]; then +CC="icc" +else +CC="cc" +fi +if [ ".`(which ccache) 2>/dev/null | grep -v '^no'`" != . ]; then +CC="ccache $CC" +fi + # prepare build environment prepare () { echo "++ establishing third-party area under ($base3rd)" @@ -490,24 +506,16 @@ echo "++ configuring build environment" base3rd="`cd $base3rd && pwd`" -CC="cc" CFLAGS="" CPPFLAGS="" LDFLAGS="" LIBS="" -if [ ".`(which gcc) 2>/dev/null | grep -v '^no'`" != . ]; then -CC="gcc" -fi -if [ ".`(which ccache) 2>/dev/null | grep -v '^no'`" != . ]; then -CC="ccache $CC" -fi if [ ".`grep 'OpenPKG RPM' ${DEVTOOL_SRCDIR}/rpmqv.c`" != . ]; then CPPFLAGS="$CPPFLAGS -DOPENPKG" fi -LDFLAGS="$LDFLAGS -L$base3rd/openssl-${v_openssl}" # shameless workaround for Neon -LIBS="$LIBS -lssl -lcrypto"# shameless workaround for Neon -LIBS="$LIBS -lm" # shameless workaround for SQLite -export CC +LDFLAGS="$LDFLAGS -L$base3rd/bin/$platform/openssl-${v_openssl}" # shameless workaround for Neon +LIBS="$LIBS -lssl -lcrypto" # shameless workaround for Neon +LIBS="$LIBS -lm" # shameless workaround for SQLite export CFLAGS export CPPFLAGS export LDFLAGS @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ configure.ac
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:09:09 Branch: HEAD Handle: 2007071915090900 Modified files: rpm configure.ac Log: it is currently not important for Linux, but nevertheless be consistent in the namings and ignore all those useless 'gnu', 'aout' and 'elf' suffixes config.guess appends Summary: RevisionChanges Path 2.206 +3 -0 rpm/configure.ac patch -p0 <<'@@ .' Index: rpm/configure.ac $ cvs diff -u -r2.205 -r2.206 configure.ac --- rpm/configure.ac 19 Jul 2007 12:44:13 - 2.205 +++ rpm/configure.ac 19 Jul 2007 14:09:09 - 2.206 @@ -122,6 +122,9 @@ -e 's;^X.*;UNKNOWN;' | \ sed -e 's;[/-];;' | \ tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']` +case "$RPM_OS_NAME" in +LINUX* ) RPM_OS_NAME="LINUX" ;; +esac v1=0; v2=0; v3=0 eval `dnl [echo "$host_os" | \ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:31:24 Branch: HEAD Handle: 2007071915312400 Modified files: rpm devtool.conf Log: fix typo Summary: RevisionChanges Path 2.49+1 -1 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.48 -r2.49 devtool.conf --- rpm/devtool.conf 19 Jul 2007 13:49:12 - 2.48 +++ rpm/devtool.conf 19 Jul 2007 14:31:24 - 2.49 @@ -215,7 +215,7 @@ export CC if [ ".$CC" != . ]; then : -if [ ".`(which gcc) 2>/dev/null | grep -v '^no'`" != . ]; then +elif [ ".`(which gcc) 2>/dev/null | grep -v '^no'`" != . ]; then CC="gcc" elif [ ".`(which icc) 2>/dev/null | grep -v '^no'`" != . ]; then CC="icc" @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/rpmio/ rpmdav.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:43:13 Branch: HEAD Handle: 2007071915431300 Modified files: rpm/rpmio rpmdav.c Log: The value 0xdead has the 32th bit set and hence it is correct that (at least non-GCC) compilers warn that the value cannot be correctly represented with a _signed_ 32-bit variable. As it is some sort of a magic value which is just increased, we can use an "unsigned int" here without problems and at the same time get rid of the warning. Summary: RevisionChanges Path 2.40+1 -1 rpm/rpmio/rpmdav.c patch -p0 <<'@@ .' Index: rpm/rpmio/rpmdav.c $ cvs diff -u -r2.39 -r2.40 rpmdav.c --- rpm/rpmio/rpmdav.c17 Jul 2007 22:12:15 - 2.39 +++ rpm/rpmio/rpmdav.c19 Jul 2007 14:43:13 - 2.40 @@ -1396,7 +1396,7 @@ } /[EMAIL PROTECTED]@*/ -static int dav_st_ino = 0xdead; +static unsigned int dav_st_ino = 0xdead; /[EMAIL PROTECTED]@*/ int davStat(const char * path, /[EMAIL PROTECTED]@*/ struct stat *st) @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/misc/ glob.c glob.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:47:02 Branch: HEAD Handle: 2007071915470200 Modified files: rpm/miscglob.c glob.h Log: Fix building under *non*-GCC compilers (here a Sun Studio 12 under Fedora 7 ;-) by making sure the glob_t used in the prototype is also overloaded. Additionally, use the correct "dirent" structure and callbacks functions. I'm sure nobody has -- at least recently -- built RPM with anything but GCC... ;-) Summary: RevisionChanges Path 1.18+6 -0 rpm/misc/glob.c 1.12+1 -0 rpm/misc/glob.h patch -p0 <<'@@ .' Index: rpm/misc/glob.c $ cvs diff -u -r1.17 -r1.18 glob.c --- rpm/misc/glob.c 28 Jan 2005 08:09:43 - 1.17 +++ rpm/misc/glob.c 19 Jul 2007 14:47:02 - 1.18 @@ -1066,9 +1066,15 @@ { const char *name; size_t len; +#ifdef _LARGEFILE64_SOURCE + struct dirent64 *d = ((flags & GLOB_ALTDIRFUNC) + ? (*pglob->gl_readdir) (stream) + : readdir64 ((DIR *) stream)); +#else struct dirent *d = ((flags & GLOB_ALTDIRFUNC) ? (*pglob->gl_readdir) (stream) : readdir ((DIR *) stream)); +#endif if (d == NULL) break; if (! REAL_DIR_ENTRY (d)) @@ . patch -p0 <<'@@ .' Index: rpm/misc/glob.h $ cvs diff -u -r1.11 -r1.12 glob.h --- rpm/misc/glob.h 25 May 2007 17:36:08 - 1.11 +++ rpm/misc/glob.h 19 Jul 2007 14:47:02 - 1.12 @@ -172,6 +172,7 @@ # else # define glob glob64 # define globfree globfree64 +# define glob_t glob64_t # endif #endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/rpmio/ digest.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:49:16 Branch: HEAD Handle: 2007071915491600 Modified files: rpm/rpmio digest.c Log: GCC is smart and silently allows casting from a function to a data pointer and then the coersion into a function pointer. Other compilers (like Sun Studio 12 under Fedora 7 here) still allow this bad practice but shout very loudly. Fix this by casting the function to the correct function pointer type the assignment requires. Summary: RevisionChanges Path 2.33+64 -64 rpm/rpmio/digest.c patch -p0 <<'@@ .' Index: rpm/rpmio/digest.c $ cvs diff -u -r2.32 -r2.33 digest.c --- rpm/rpmio/digest.c10 Jul 2007 13:09:24 - 2.32 +++ rpm/rpmio/digest.c19 Jul 2007 14:49:16 - 2.33 @@ -349,9 +349,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) md5Reset; - ctx->Update = (void *) md5Update; - ctx->Digest = (void *) md5Digest; + ctx->Reset = (int (*)(void *)) md5Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) md5Update; + ctx->Digest = (int (*)(void *, unsigned char *)) md5Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_SHA1: @@ -363,9 +363,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) sha1Reset; - ctx->Update = (void *) sha1Update; - ctx->Digest = (void *) sha1Digest; + ctx->Reset = (int (*)(void *)) sha1Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) sha1Update; + ctx->Digest = (int (*)(void *, unsigned char *)) sha1Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_RIPEMD128: @@ -377,9 +377,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) rmd128Reset; - ctx->Update = (void *) rmd128Update; - ctx->Digest = (void *) rmd128Digest; + ctx->Reset = (int (*)(void *)) rmd128Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) rmd128Update; + ctx->Digest = (int (*)(void *, unsigned char *)) rmd128Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_RIPEMD160: @@ -391,9 +391,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) rmd160Reset; - ctx->Update = (void *) rmd160Update; - ctx->Digest = (void *) rmd160Digest; + ctx->Reset = (int (*)(void *)) rmd160Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) rmd160Update; + ctx->Digest = (int (*)(void *, unsigned char *)) rmd160Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_RIPEMD256: @@ -405,9 +405,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) rmd256Reset; - ctx->Update = (void *) rmd256Update; - ctx->Digest = (void *) rmd256Digest; + ctx->Reset = (int (*)(void *)) rmd256Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) rmd256Update; + ctx->Digest = (int (*)(void *, unsigned char *)) rmd256Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_RIPEMD320: @@ -419,9 +419,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) rmd320Reset; - ctx->Update = (void *) rmd320Update; - ctx->Digest = (void *) rmd320Digest; + ctx->Reset = (int (*)(void *)) rmd320Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) rmd320Update; + ctx->Digest = (int (*)(void *, unsigned char *)) rmd320Digest; /[EMAIL PROTECTED]@*/ break; case PGPHASHALGO_SALSA10: @@ -433,9 +433,9 @@ /[EMAIL PROTECTED]@*/ ctx->param = xcalloc(1, ctx->paramsize); /[EMAIL PROTECTED]@*/ - ctx->Reset = (void *) salsa10Reset; - ctx->Update = (void *) salsa10Update; - ctx->Digest = (void *) salsa10Digest; + ctx->Reset = (int (*)(void *)) salsa10Reset; + ctx->Update = (int (*)(void *, const unsigned char *, unsigned int)) salsa10Update; + ctx->Digest = (int (*)(void *, unsigned char *)) sal
[CVS] RPM: rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:51:03 Branch: HEAD Handle: 2007071915510300 Modified files: rpm system.h Log: Final step in getting RPM 5 building with the non-GCC-derived compiler Sun Studio 12 (under Fedora 7): the __FUNCTION__ is a GCC'ism. C99 has __func__ but we cannot assume this is always available for us. So, stay with the GCC symbol name but provide a proper fallback so RPM can be compiled with non-GCC compilers, too. Summary: RevisionChanges Path 2.69+9 -0 rpm/system.h patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.68 -r2.69 system.h --- rpm/system.h 16 Jul 2007 09:14:56 - 2.68 +++ rpm/system.h 19 Jul 2007 14:51:03 - 2.69 @@ -709,4 +709,13 @@ } #endif +/* provide fallback definition for GCC function name symbol */ +#if !defined(__FUNCTION__) || !(defined(__GNUC__) && __GNUC__ >= 2) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define __FUNCTION__ __func__ +#else +#define __FUNCTION__ "" +#endif +#endif + #endif /* H_SYSTEM */ @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 16:52:01 Branch: HEAD Handle: 2007071915520100 Modified files: rpm CHANGES Log: remember my last efforts Summary: RevisionChanges Path 1.1496 +1 -0 rpm/CHANGES patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.1495 -r1.1496 CHANGES --- rpm/CHANGES 19 Jul 2007 06:42:56 - 1.1495 +++ rpm/CHANGES 19 Jul 2007 14:52:01 - 1.1496 @@ -1,4 +1,5 @@ 4.5 -> 5.0: +- rse: cleanup and fix the code to compile under *non*-GCC compilers (e.g. Sun Studio) - rse: fix building under --with-dmalloc with DMalloc 5.5.2 where "x{malloc,calloc,realloc,free}" are also overridden - rse: provide convenience --enable-build-debug Autoconf option for building RPM with debugging instrumentation - rse: fix memory leak and segfault in lib/psm.c related to dirname(3) usage @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ devtool.conf
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:13:11 Branch: HEAD Handle: 2007071919131100 Modified files: rpm devtool.conf Log: add more platform feedback, notice the last test date and especially add the used compiler Summary: RevisionChanges Path 2.50+20 -15 rpm/devtool.conf patch -p0 <<'@@ .' Index: rpm/devtool.conf $ cvs diff -u -r2.49 -r2.50 devtool.conf --- rpm/devtool.conf 19 Jul 2007 14:31:24 - 2.49 +++ rpm/devtool.conf 19 Jul 2007 18:13:11 - 2.50 @@ -133,28 +133,33 @@ ## third-party libraries are required to be built from scratch and ## on arbitrary Unix platforms. This inherently requires lots of ## fiddling with their build environment. Just treat the prepare() -## function above as opaque and do not think about it. It just +## function below as opaque and do not think about it. It just ## contains all the essential parts of the OpenPKG .spec files for ## achieving this. Nevertheless this whole procedure is completely ## independent of any OpenPKG instance itself, of course. ## ## This procedure was used by Ralf S. Engelschall to successfully ## build RPM 5 under at least the following particular Unix -## platforms (GNU shtool platform identifiers listed): +## platforms (each one defined by the combination of hardware +## architecture, operating system and compiler): ## -## ix86-freebsd6.2 -## amd64-freebsd6.2 -## ix86-freebsd7.0 -## ia64-freebsd6.2 -## ix86-fedora7 -## ix86-debian3.1 -## ix86-debian4.0 -## ix86-rhel4 -## ix86-solaris9 -## sparc64-solaris8 -## sparc64-solaris9 -## sparc64-solaris10 -## amd64-solaris10 +## o 2007-07-19: ix86-freebsd6.2-gcc4.2.0 +## o 2007-07-19: ix86-freebsd6.2-gcc4.3.0s20070713 +## o 2007-07-17: ix86-freebsd6.2-gcc3.4 +## o 2007-07-17: amd64-freebsd6.2-gcc4.1.2 +## o 2007-07-17: ix86-freebsd7.0-gcc4.1.2 +## o 2007-07-17: ia64-freebsd6.2-gcc4.1.2 +## o 2007-07-18: ix86-fedora7-gcc4.2.0 +## o 2007-07-19: ix86-fedora7-sunstudio12 +## o 2007-07-19: ix86-fedora7-icc10.0 +## o 2007-07-17: ix86-debian3.1-gcc4.1.2 +## o 2007-07-17: ix86-debian4.0-gcc4.2.0 +## o 2007-07-17: ix86-rhel4-gcc4.1.2 +## o 2007-07-17: ix86-solaris9-gcc4.1.2 +## o 2007-07-17: sparc64-solaris8-gcc4.1.2 +## o 2007-07-17: sparc64-solaris9-gcc4.1.2 +## o 2007-07-17: sparc64-solaris10-gcc4.1.2 +## o 2007-07-17: amd64-solaris10-gcc4.1.2 ## # prerequisite check @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ configure.ac
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:26:21 Branch: HEAD Handle: 2007071919262100 Modified files: rpm configure.ac Log: increase support for more mainstream compilers for PIC and debug instrumentation; especially explicitly check for the GCC CLI as the Intel C/C++ compiler also defines __GNUC__ and is rather compatible to GCC but unfortunately doesn't understand all CLI options like -Wxxx of GCC Summary: RevisionChanges Path 2.207 +18 -4 rpm/configure.ac patch -p0 <<'@@ .' Index: rpm/configure.ac $ cvs diff -u -r2.206 -r2.207 configure.ac --- rpm/configure.ac 19 Jul 2007 14:09:09 - 2.206 +++ rpm/configure.ac 19 Jul 2007 18:26:21 - 2.207 @@ -66,10 +66,17 @@ AC_ARG_ENABLE(build-pic, AS_HELP_STRING([--enable-build-pic], [build RPM with Position Independent Code (PIC) (GCC only)]), [dnl if test ".$enableval" = .yes; then -if test ".$ac_cv_c_compiler_gnu" = .yes; then +if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then +dnl # GNU GCC (usually "gcc") +CFLAGS="$CFLAGS -fPIC -DPIC" +elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then +dnl # Sun Studio (usually "cc") +CFLAGS="$CFLAGS -KPIC -DPIC" +elif test ".`$CC -help 2>&1 | grep 'Intel Corporation'`" != .; then +dnl # Intel C/C++ Compiler (usually "icc") CFLAGS="$CFLAGS -fPIC -DPIC" else -AC_MSG_WARN([--enable-build-pic requires GCC]) +AC_MSG_WARN([--enable-build-pic requires GCC, Sun Studio or Intel C/C++]) fi fi ]) @@ -87,7 +94,7 @@ AC_ARG_ENABLE(build-warnings, AS_HELP_STRING([--enable-build-warnings], [build RPM with extra compiler warnings turned on (GCC only)]), [dnl if test ".$enableval" = .yes; then -if test ".$ac_cv_c_compiler_gnu" = .yes; then +if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then dnl # GNU GCC (usually "gcc") CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then @@ -105,7 +112,14 @@ AS_HELP_STRING([--enable-build-debug], [build RPM instrumented for debugging]), [dnl if test ".$enableval" = .yes; then CFLAGS="$CFLAGS -g" -if test ".$ac_cv_c_compiler_gnu" = .yes; then +if test ".`$CC --version 2>&1 | grep 'GCC'`" != .; then +dnl # GNU GCC (usually "gcc") +CFLAGS="$CFLAGS -O0" +elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then +dnl # Sun Studio (usually "cc") +CFLAGS="$CFLAGS -xO0" +elif test ".`$CC -help 2>&1 | grep 'Intel Corporation'`" != .; then +dnl # Intel C/C++ Compiler (usually "icc") CFLAGS="$CFLAGS -O0" fi fi @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:29:16 Branch: HEAD Handle: 2007071919291600 Modified files: rpm system.h Log: there is nowhere in RPM a define named NEED_TIMEZONE and the code worked without explicit declaration, so nuke it at all Summary: RevisionChanges Path 2.70+0 -4 rpm/system.h patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.69 -r2.70 system.h --- rpm/system.h 19 Jul 2007 14:51:03 - 2.69 +++ rpm/system.h 19 Jul 2007 18:29:16 - 2.70 @@ -69,10 +69,6 @@ # endif #endif -#if NEED_TIMEZONE -extern time_t timezone; -#endif - /* Since major is a function on SVR4, we can't use `ifndef major'. */ #if MAJOR_IN_MKDEV #include @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:32:38 Branch: HEAD Handle: 2007071919323800 Modified files: rpm system.h Log: MAJOR_IN_MKDEV and MAJOR_IN_SYSMACROS are Autoconf provided defines and are either define or not defined, so do not use them in numerical context Summary: RevisionChanges Path 2.71+2 -2 rpm/system.h patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.70 -r2.71 system.h --- rpm/system.h 19 Jul 2007 18:29:16 - 2.70 +++ rpm/system.h 19 Jul 2007 18:32:38 - 2.71 @@ -70,11 +70,11 @@ #endif /* Since major is a function on SVR4, we can't use `ifndef major'. */ -#if MAJOR_IN_MKDEV +#if defined(MAJOR_IN_MKDEV) #include #define HAVE_MAJOR #endif -#if MAJOR_IN_SYSMACROS +#if defined(MAJOR_IN_SYSMACROS) #include #define HAVE_MAJOR #endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/lib/ rpmds.c rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:35:07 Branch: HEAD Handle: 2007071919350700 Modified files: rpm system.h rpm/lib rpmds.c Log: fix usage of ENABLE_NLS Autoconf define Summary: RevisionChanges Path 2.60+1 -1 rpm/lib/rpmds.c 2.72+1 -1 rpm/system.h patch -p0 <<'@@ .' Index: rpm/lib/rpmds.c $ cvs diff -u -r2.59 -r2.60 rpmds.c --- rpm/lib/rpmds.c 2 Jul 2007 08:53:29 - 2.59 +++ rpm/lib/rpmds.c 19 Jul 2007 18:35:07 - 2.60 @@ -22,7 +22,7 @@ */ #if defined(__sun) -#if ENABLE_NLS && !defined(__LCLINT__) +#if defined(ENABLE_NLS) && !defined(__LCLINT__) # define _(Text) gettext (Text) #else # define _(Text) Text @@ . patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.71 -r2.72 system.h --- rpm/system.h 19 Jul 2007 18:32:38 - 2.71 +++ rpm/system.h 19 Jul 2007 18:35:07 - 2.72 @@ -470,7 +470,7 @@ # define setlocale(Category, Locale) /* empty */ #endif -#if ENABLE_NLS && !defined(__LCLINT__) +#if defined(ENABLE_NLS) && !defined(__LCLINT__) # include # define _(Text) dgettext (PACKAGE, Text) # define D_(Text) Text @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/misc/ glob.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:39:29 Branch: HEAD Handle: 2007071919392900 Modified files: rpm/miscglob.h Log: I cannot see a reason why misc/glob.h tries to define size_t (no underscore) although it itself uses just __size_t; either a typo or a relict from very ancient days. Anyway, disable it as compilers correctly warn about double-declaration as size_t is the business of vendor includes Summary: RevisionChanges Path 1.13+2 -0 rpm/misc/glob.h patch -p0 <<'@@ .' Index: rpm/misc/glob.h $ cvs diff -u -r1.12 -r1.13 glob.h --- rpm/misc/glob.h 19 Jul 2007 14:47:02 - 1.12 +++ rpm/misc/glob.h 19 Jul 2007 18:39:29 - 1.13 @@ -53,9 +53,11 @@ #if !defined(__size_t) && !defined(_BSD_SIZE_T_DEFINED_) # if defined __GNUC__ && __GNUC__ >= 2 typedef __SIZE_TYPE__ __size_t; +# if 0 # ifdef _XOPEN_SOURCE typedef __SIZE_TYPE__ size_t; # endif +# endif # else /* This is a guess. */ typedef unsigned long int __size_t; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:40:38 Branch: HEAD Handle: 2007071919403800 Modified files: rpm system.h Log: NEED_STRINGS_H is an Autoconf define, so correctly use it to avoid a compiler warning Summary: RevisionChanges Path 2.73+1 -1 rpm/system.h patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.72 -r2.73 system.h --- rpm/system.h 19 Jul 2007 18:35:07 - 2.72 +++ rpm/system.h 19 Jul 2007 18:40:38 - 2.73 @@ -609,7 +609,7 @@ #define S_ISSOCK(mode) ((mode & 0xf000) == S_IFSOCK) #endif -#if NEED_STRINGS_H +#if defined(NEED_STRINGS_H) #include #endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ system.h
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:41:46 Branch: HEAD Handle: 2007071919414600 Modified files: rpm system.h Log: NEED_MYREALLOC is an Autoconf define, so correctly use it to avoid a compiler warning Summary: RevisionChanges Path 2.74+1 -1 rpm/system.h patch -p0 <<'@@ .' Index: rpm/system.h $ cvs diff -u -r2.73 -r2.74 system.h --- rpm/system.h 19 Jul 2007 18:40:38 - 2.73 +++ rpm/system.h 19 Jul 2007 18:41:46 - 2.74 @@ -613,7 +613,7 @@ #include #endif -#if NEED_MYREALLOC +#if defined(NEED_MYREALLOC) #define realloc(ptr,size) myrealloc(ptr,size) extern void *myrealloc(void *, size_t); #endif @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 20:55:35 Branch: HEAD Handle: 2007071919553500 Modified files: rpm CHANGES Log: notice that Intel C/C++ works now just fine, too Summary: RevisionChanges Path 1.1497 +1 -1 rpm/CHANGES patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.1496 -r1.1497 CHANGES --- rpm/CHANGES 19 Jul 2007 14:52:01 - 1.1496 +++ rpm/CHANGES 19 Jul 2007 18:55:35 - 1.1497 @@ -1,5 +1,5 @@ 4.5 -> 5.0: -- rse: cleanup and fix the code to compile under *non*-GCC compilers (e.g. Sun Studio) +- rse: cleanup and fix the code to compile under *non*-GCC compilers (e.g. Sun Studio and Intel C/C++) - rse: fix building under --with-dmalloc with DMalloc 5.5.2 where "x{malloc,calloc,realloc,free}" are also overridden - rse: provide convenience --enable-build-debug Autoconf option for building RPM with debugging instrumentation - rse: fix memory leak and segfault in lib/psm.c related to dirname(3) usage @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES configure.ac rpm/rpmio/ md4.c rmd128.c rmd160....
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 21:07:57 Branch: HEAD Handle: 2007071920075600 Modified files: rpm CHANGES configure.ac rpm/rpmio md4.c rmd128.c rmd160.c rmd256.c rmd320.c salsa10.c salsa20.c tiger.c Log: Unbreak big-endian handling in memory (memcmp) and cryptography (MD4, RMD*, SASLA* and Tiger) functions by providing the missing Autoconf define "WORDS_BIGENDIAN". Also, fix the usage of "WORDS_BIGENDIAN", too. Thank god platforms nowdays have memcmp(3) and RPM by default doesn't _use_ one of the mentioned cryptography functions. Else, it would have been ultra-broken on SPARC64 and other big-endian hardware architectures. Summary: RevisionChanges Path 1.1498 +1 -0 rpm/CHANGES 2.208 +1 -0 rpm/configure.ac 1.5 +2 -2 rpm/rpmio/md4.c 1.4 +2 -2 rpm/rpmio/rmd128.c 1.4 +2 -2 rpm/rpmio/rmd160.c 1.4 +2 -2 rpm/rpmio/rmd256.c 1.4 +2 -2 rpm/rpmio/rmd320.c 1.4 +1 -1 rpm/rpmio/salsa10.c 1.4 +1 -1 rpm/rpmio/salsa20.c 1.5 +1 -1 rpm/rpmio/tiger.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.1497 -r1.1498 CHANGES --- rpm/CHANGES 19 Jul 2007 18:55:35 - 1.1497 +++ rpm/CHANGES 19 Jul 2007 19:07:56 - 1.1498 @@ -1,4 +1,5 @@ 4.5 -> 5.0: +- rse: unbreak big-endian handling in memory and cryptography functions by Autoconf providing WORDS_BIGENDIAN and fixing usage - rse: cleanup and fix the code to compile under *non*-GCC compilers (e.g. Sun Studio and Intel C/C++) - rse: fix building under --with-dmalloc with DMalloc 5.5.2 where "x{malloc,calloc,realloc,free}" are also overridden - rse: provide convenience --enable-build-debug Autoconf option for building RPM with debugging instrumentation @@ . patch -p0 <<'@@ .' Index: rpm/configure.ac $ cvs diff -u -r2.207 -r2.208 configure.ac --- rpm/configure.ac 19 Jul 2007 18:26:21 - 2.207 +++ rpm/configure.ac 19 Jul 2007 19:07:56 - 2.208 @@ -414,6 +414,7 @@ dnl # standard checks AM_C_PROTOTYPES AC_C_INLINE +AC_C_BIGENDIAN dnl # standard headers (specific) AC_HEADER_STDC @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/md4.c $ cvs diff -u -r1.4 -r1.5 md4.c --- rpm/rpmio/md4.c 9 Jul 2007 22:31:57 - 1.4 +++ rpm/rpmio/md4.c 19 Jul 2007 19:07:56 - 1.5 @@ -77,12 +77,12 @@ uint32_t a, b, c, d; register uint32_t* w; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN register byte t; #endif w = mp->data; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN t = 16; while (t--) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rmd128.c $ cvs diff -u -r1.3 -r1.4 rmd128.c --- rpm/rpmio/rmd128.c24 Jun 2007 10:27:21 - 1.3 +++ rpm/rpmio/rmd128.c19 Jul 2007 19:07:56 - 1.4 @@ -137,12 +137,12 @@ register uint32_t aa,bb,cc,dd; register uint32_t aaa,bbb,ccc,ddd; register uint32_t* X; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN register byte t; #endif X = mp->data; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN t = 16; while (t--) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rmd160.c $ cvs diff -u -r1.3 -r1.4 rmd160.c --- rpm/rpmio/rmd160.c24 Jun 2007 10:27:21 - 1.3 +++ rpm/rpmio/rmd160.c19 Jul 2007 19:07:56 - 1.4 @@ -154,12 +154,12 @@ register uint32_t aa,bb,cc,dd,ee; register uint32_t aaa,bbb,ccc,ddd,eee; register uint32_t* X; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN register byte t; #endif X = mp->data; - #if WORDS_BIGENDIAN + #ifdef WORDS_BIGENDIAN t = 16; while (t--) { @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/rmd256.c ==
[CVS] RPM: rpm/misc/ glob.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 21:12:47 Branch: HEAD Handle: 2007071920124700 Modified files: rpm/miscglob.c Log: do not shadow a variable -- reuse it Summary: RevisionChanges Path 1.19+1 -1 rpm/misc/glob.c patch -p0 <<'@@ .' Index: rpm/misc/glob.c $ cvs diff -u -r1.18 -r1.19 glob.c --- rpm/misc/glob.c 19 Jul 2007 14:47:02 - 1.18 +++ rpm/misc/glob.c 19 Jul 2007 19:12:47 - 1.19 @@ -1167,7 +1167,7 @@ memory_error: { -int save = errno; +save = errno; if (flags & GLOB_ALTDIRFUNC) (*pglob->gl_closedir) (stream); else @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/rpmio/ rpmdav.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 21:24:40 Branch: HEAD Handle: 2007071920244000 Modified files: rpm/rpmio rpmdav.c Log: fix a 'use before initialization' GCC hasn't catched Summary: RevisionChanges Path 2.41+1 -1 rpm/rpmio/rpmdav.c patch -p0 <<'@@ .' Index: rpm/rpmio/rpmdav.c $ cvs diff -u -r2.40 -r2.41 rpmdav.c --- rpm/rpmio/rpmdav.c19 Jul 2007 14:43:13 - 2.40 +++ rpm/rpmio/rpmdav.c19 Jul 2007 19:24:40 - 2.41 @@ -1205,7 +1205,7 @@ FD_t fd = cookie; #endif ssize_t rc; -int xx; +int xx = -1; #if !defined(NEONBLOWSCHUNKS) ne_session * sess; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/rpmio/ rpmio-stub.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Ralf S. Engelschall Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 19-Jul-2007 21:26:24 Branch: HEAD Handle: 2007071920262400 Modified files: rpm/rpmio rpmio-stub.c Log: use the correct function pointer type in the casts as a simple data pointer type leads to (correct) warnings (under non GCC compilers) Summary: RevisionChanges Path 2.2 +11 -11 rpm/rpmio/rpmio-stub.c patch -p0 <<'@@ .' Index: rpm/rpmio/rpmio-stub.c $ cvs diff -u -r2.1 -r2.2 rpmio-stub.c --- rpm/rpmio/rpmio-stub.c15 Jul 2007 19:37:23 - 2.1 +++ rpm/rpmio/rpmio-stub.c19 Jul 2007 19:26:24 - 2.2 @@ -8,27 +8,27 @@ #include "debug.h" const char * (*_Fstrerror) (void * fd) - = (void *)Fstrerror; + = (const char *(*)(void *))Fstrerror; size_t (*_Fread) (void * buf, size_t size, size_t nmemb, void * fd) - = (void *)Fread; + = (size_t (*)(void *, size_t, size_t, void *))Fread; size_t (*_Fwrite) (const void * buf, size_t size, size_t nmemb, void * fd) - = (void *)Fwrite; + = (size_t (*)(const void * buf, size_t size, size_t nmemb, void * fd))Fwrite; int (*_Fseek) (void * fd, _libio_off_t offset, int whence) - = (void *)Fseek; + = (int (*) (void *, _libio_off_t, int))Fseek; int (*_Fclose) (void * fd) - = (void *)Fclose; + = (int (*) (void *))Fclose; void * (*_Fdopen) (void * ofd, const char * fmode) - = (void *)Fdopen; + = (void * (*) (void *, const char *))Fdopen; void * (*_Fopen) (const char * path, const char * fmode) - = (void *)Fopen; + = (void * (*) (const char *, const char *))Fopen; int (*_Fflush) (void * fd) - = (void *)Fflush; + = (int (*) (void *))Fflush; int (*_Ferror) (void * fd) - = (void *)Ferror; + = (int (*) (void *))Ferror; int (*_Fileno) (void * fd) - = (void *)Fileno; + = (int (*) (void *))Fileno; int (*_Fcntl) (void * fd, int op, void *lip) - = (void *)Fcntl; + = (int (*) (void *, int, void *))Fcntl; int (*_Mkdir) (const char * path, mode_t mode) = Mkdir; int (*_Chdir) (const char * path) = Chdir; @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org
[CVS] RPM: rpm/ CHANGES rpm/lib/ formats.c
RPM Package Manager, CVS Repository http://rpm5.org/cvs/ Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: rpm Date: 20-Jul-2007 02:57:43 Branch: HEAD Handle: 2007072001574201 Modified files: rpm CHANGES rpm/lib formats.c Log: - fix a --import memory leak. Summary: RevisionChanges Path 1.1499 +1 -0 rpm/CHANGES 2.101 +7 -1 rpm/lib/formats.c patch -p0 <<'@@ .' Index: rpm/CHANGES $ cvs diff -u -r1.1498 -r1.1499 CHANGES --- rpm/CHANGES 19 Jul 2007 19:07:56 - 1.1498 +++ rpm/CHANGES 20 Jul 2007 00:57:42 - 1.1499 @@ -1,4 +1,5 @@ 4.5 -> 5.0: +- jbj: fix a --import memory leak. - rse: unbreak big-endian handling in memory and cryptography functions by Autoconf providing WORDS_BIGENDIAN and fixing usage - rse: cleanup and fix the code to compile under *non*-GCC compilers (e.g. Sun Studio and Intel C/C++) - rse: fix building under --with-dmalloc with DMalloc 5.5.2 where "x{malloc,calloc,realloc,free}" are also overridden @@ . patch -p0 <<'@@ .' Index: rpm/lib/formats.c $ cvs diff -u -r2.100 -r2.101 formats.c --- rpm/lib/formats.c 18 Jun 2007 17:31:23 - 2.100 +++ rpm/lib/formats.c 20 Jul 2007 00:57:43 - 2.101 @@ -161,6 +161,7 @@ const unsigned char * s; size_t ns; int atype; +char * val; switch (type) { case RPM_OPENPGP_TYPE: @@ -174,6 +175,8 @@ case RPM_STRING_TYPE: case RPM_STRING_ARRAY_TYPE: enc = data; + s = NULL; + ns = 0; if (b64decode(enc, (void **)&s, &ns)) return xstrdup(_("(not base64)")); atype = PGPARMOR_PUBKEY;/* XXX check pkt for pubkey */ @@ -191,7 +194,10 @@ } /* XXX this doesn't use padding directly, assumes enough slop in retval. */ -return pgpArmorWrap(atype, s, ns); +val = pgpArmorWrap(atype, s, ns); +if (atype == PGPARMOR_PUBKEY) + s = _free(s); +return val; } /** @@ . __ RPM Package Managerhttp://rpm5.org CVS Sources Repositoryrpm-cvs@rpm5.org