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: 21-Jun-2007 14:13:29 Branch: HEAD Handle: 2007062113132801 Modified files: rpm CHANGES configure.ac rpm/lib fsm.c rpm/rpmdb legacy.c Log: Apply a patch from my OpenPKG development queue which makes sure that madvise(2) is used only if it really exists, because there were platforms out there in the past (most notably SCO UnixWare) which defined MADV_XXX but without having madvise(2) really available. Summary: Revision Changes Path 1.1384 +1 -0 rpm/CHANGES 2.105 +1 -0 rpm/configure.ac 2.115 +2 -2 rpm/lib/fsm.c 1.28 +1 -1 rpm/rpmdb/legacy.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.1383 -r1.1384 CHANGES --- rpm/CHANGES 21 Jun 2007 12:01:31 -0000 1.1383 +++ rpm/CHANGES 21 Jun 2007 12:13:28 -0000 1.1384 @@ -1,4 +1,5 @@ 4.5 -> 5.0: + - rse: fix building under UnixWare (blind port) - rse: fix building under FreeBSD 7-CURRENT - rse: fix building under NetBSD 3.1 - rse: partially cleaned up the "configure.ac" scripts. @@ . patch -p0 <<'@@ .' Index: rpm/configure.ac ============================================================================ $ cvs diff -u -r2.104 -r2.105 configure.ac --- rpm/configure.ac 21 Jun 2007 09:52:17 -0000 2.104 +++ rpm/configure.ac 21 Jun 2007 12:13:28 -0000 2.105 @@ -833,6 +833,7 @@ AC_CHECK_FUNCS(stpcpy stpncpy strcspn) AC_CHECK_FUNCS(strdup strndup strerror strtol strtoul strspn strstr) AC_CHECK_FUNCS(sighold sigrelse sigpause sigprocmask sigemptyset sigaddset sigdelset sigsuspend) +AC_CHECK_FUNCS(madvise) AC_CHECK_FUNCS(__secure_getenv) @@ . patch -p0 <<'@@ .' Index: rpm/lib/fsm.c ============================================================================ $ cvs diff -u -r2.114 -r2.115 fsm.c --- rpm/lib/fsm.c 19 Jun 2007 06:42:10 -0000 2.114 +++ rpm/lib/fsm.c 21 Jun 2007 12:13:29 -0000 2.115 @@ -1004,7 +1004,7 @@ rdbuf = fsm->rdbuf; fsm->rdbuf = (char *) mapped; fsm->rdlen = nmapped = st->st_size; -#if defined(MADV_DONTNEED) +#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED) xx = madvise(mapped, nmapped, MADV_DONTNEED); #endif } @@ -1036,7 +1036,7 @@ /[EMAIL PROTECTED]@*/ if (mapped != (void *)-1) { xx = msync(mapped, nmapped, MS_ASYNC); -#if defined(MADV_DONTNEED) +#if defined(HAVE_MADVISE) && defined(MADV_DONTNEED) xx = madvise(mapped, nmapped, MADV_DONTNEED); #endif /[EMAIL PROTECTED]@*/ @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/legacy.c ============================================================================ $ cvs diff -u -r1.27 -r1.28 legacy.c --- rpm/rpmdb/legacy.c 19 Jun 2007 16:03:50 -0000 1.27 +++ rpm/rpmdb/legacy.c 21 Jun 2007 12:13:29 -0000 1.28 @@ -195,7 +195,7 @@ break; } -#ifdef MADV_SEQUENTIAL +#if defined(HAVE_MADVISE) && defined(MADV_SEQUENTIAL) xx = madvise(mapped, fsize, MADV_SEQUENTIAL); #endif } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org