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-Jun-2007 08:42:10 Branch: HEAD Handle: 2007061907421000 Modified files: rpm/lib fsm.c Log: fix an 'unused variable' warning and fix usage of HAVE_MMAP (actually unused as no Autoconf glue exists anyway) Summary: Revision Changes Path 2.114 +6 -4 rpm/lib/fsm.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/lib/fsm.c ============================================================================ $ cvs diff -u -r2.113 -r2.114 fsm.c --- rpm/lib/fsm.c 25 May 2007 17:36:02 -0000 2.113 +++ rpm/lib/fsm.c 19 Jun 2007 06:42:10 -0000 2.114 @@ -937,7 +937,9 @@ struct stat * st = &fsm->sb; struct stat * ost = &fsm->osb; size_t left; +#if defined(HAVE_MMAP) int xx; +#endif int rc; st->st_size = (writeData ? ost->st_size : 0); @@ -983,7 +985,7 @@ if (rc) goto exit; if (writeData && S_ISREG(st->st_mode)) { -#if HAVE_MMAP +#if defined(HAVE_MMAP) char * rdbuf = NULL; void * mapped = (void *)-1; size_t nmapped = 0; @@ -995,7 +997,7 @@ if (rc) goto exit; /* XXX unbuffered mmap generates *lots* of fdio debugging */ -#if HAVE_MMAP +#if defined(HAVE_MMAP) if (use_mmap) { mapped = mmap(NULL, st->st_size, PROT_READ, MAP_SHARED, Fileno(fsm->rfd), 0); if (mapped != (void *)-1) { @@ -1012,7 +1014,7 @@ left = st->st_size; while (left) { -#if HAVE_MMAP +#if defined(HAVE_MMAP) if (mapped != (void *)-1) { fsm->rdnb = nmapped; } else @@ -1030,7 +1032,7 @@ left -= fsm->wrnb; } -#if HAVE_MMAP +#if defined(HAVE_MMAP) /[EMAIL PROTECTED]@*/ if (mapped != (void *)-1) { xx = msync(mapped, nmapped, MS_ASYNC); @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org