RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  j...@rpm5.org
  Module: rpm                              Date:   27-Jun-2016 05:10:04
  Branch: rpm-5_4                          Handle: 2016062703100301

  Modified files:           (Branch: rpm-5_4)
    rpm                     CHANGES
    rpm/lib                 depends.c librpm.vers poptALL.c psm.c psm.h
                            rpmal.c rpmds.c rpmfc.c rpmfi.c rpmgi.c rpmps.c
                            rpmrc.c rpmte.c rpmts.c

  Log:
    - lib: add/use RPMIOPOOL_ macros where possible.

  Summary:
    Revision    Changes     Path
    1.3501.2.506+1  -0      rpm/CHANGES
    1.461.4.12  +11 -13     rpm/lib/depends.c
    1.77.2.5    +1  -1      rpm/lib/librpm.vers
    2.144.2.14  +26 -52     rpm/lib/poptALL.c
    2.399.2.21  +3  -20     rpm/lib/psm.c
    2.81.4.2    +1  -1      rpm/lib/psm.h
    2.76.4.5    +1  -18     rpm/lib/rpmal.c
    2.170.2.35  +1  -18     rpm/lib/rpmds.c
    1.75.2.28   +1  -18     rpm/lib/rpmfc.c
    2.160.4.7   +1  -18     rpm/lib/rpmfi.c
    2.75.2.15   +1  -18     rpm/lib/rpmgi.c
    2.35.4.3    +1  -16     rpm/lib/rpmps.c
    2.289.4.12  +5  -4      rpm/lib/rpmrc.c
    2.109.2.4   +3  -36     rpm/lib/rpmte.c
    2.188.2.17  +4  -21     rpm/lib/rpmts.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3501.2.505 -r1.3501.2.506 CHANGES
  --- rpm/CHANGES       27 Jun 2016 03:08:20 -0000      1.3501.2.505
  +++ rpm/CHANGES       27 Jun 2016 03:10:03 -0000      1.3501.2.506
  @@ -1,4 +1,5 @@
   5.4.17 -> 5.4.18:
  +    - jbj: lib: add/use RPMIOPOOL_ macros where possible.
       - jbj: rpmdb: add/use RPMIOPOOL_ macros where possible.
       - jbj: rpmdb: rename dbiIndex -> rpmdbi type, dbiFoo() -> rpmdbiFoo().
       - jbj: rpmio: add/use RPMIOPOOL_ macros where possible.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.461.4.11 -r1.461.4.12 depends.c
  --- rpm/lib/depends.c 27 Feb 2016 20:49:19 -0000      1.461.4.11
  +++ rpm/lib/depends.c 27 Jun 2016 03:10:03 -0000      1.461.4.12
  @@ -13,7 +13,7 @@
   #include <ugid.h>            /* XXX user()/group() probes */
   
   #include <rpmtag.h>
  -#define      _RPMDB_INTERNAL         /* XXX response cache needs dbiOpen et 
al. */
  +#define      _RPMDB_INTERNAL         /* XXX response cache needs rpmdbiOpen 
et al. */
   #include <rpmdb.h>
   
   #define      _RPMEVR_INTERNAL
  @@ -911,11 +911,10 @@
   
   #if defined(CACHE_DEPENDENCY_RESULT)
       /*
  -     * Check if dbiOpen/dbiPut failed (e.g. permissions), we can't cache.
  +     * Check if rpmdbiOpen/rpmdbiPut failed (e.g. permissions), we can't 
cache.
        */
       if (_cacheDependsRC) {
  -     dbiIndex dbi;
  -     dbi = dbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPCACHE, 0);
  +     rpmdbi dbi = rpmdbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPCACHE, 0);
        if (dbi == NULL)
            _cacheDependsRC = 0;
        else {
  @@ -928,7 +927,7 @@
                size_t datalen = 0;
                size_t DNEVRlen = strlen(DNEVR);
   
  -             xx = dbiCopen(dbi, dbiTxnid(dbi), &dbcursor, 0);
  +             xx = rpmdbiCopen(dbi, rpmdbiTxnid(dbi), &dbcursor, 0);
   
                memset(key, 0, sizeof(*key));
   /*@i@*/              key->data = (void *) DNEVR;
  @@ -937,7 +936,7 @@
                data->data = datap;
                data->size = datalen;
   /*@-nullstate@*/ /* FIX: data->data may be NULL */
  -             xx = dbiGet(dbi, dbcursor, key, data, DB_SET);
  +             xx = rpmdbiGet(dbi, dbcursor, key, data, DB_SET);
   /*@=nullstate@*/
                DNEVR = (char *) key->data;
                DNEVRlen = key->size;
  @@ -946,7 +945,7 @@
   
                if (xx == 0 && datap && datalen == 4)
                    memcpy(&rc, datap, datalen);
  -             xx = dbiCclose(dbi, dbcursor, 0);
  +             xx = rpmdbiCclose(dbi, dbcursor, 0);
            }
   
            if (rc >= 0) {
  @@ -1519,12 +1518,11 @@
   
   exit:
       /*
  -     * If dbiOpen/dbiPut fails (e.g. permissions), we can't cache.
  +     * If rpmdbiOpen/rpmdbiPut fails (e.g. permissions), we can't cache.
        */
   #if defined(CACHE_DEPENDENCY_RESULT)
       if (_cacheDependsRC && _cacheThisRC) {
  -     dbiIndex dbi;
  -     dbi = dbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPCACHE, 0);
  +     rpmdbi dbi = rpmdbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPCACHE, 0);
        if (dbi == NULL) {
            _cacheDependsRC = 0;
        } else {
  @@ -1534,7 +1532,7 @@
                DBC * dbcursor = NULL;
                size_t DNEVRlen = strlen(DNEVR);
   
  -             xx = dbiCopen(dbi, dbiTxnid(dbi), &dbcursor, DB_WRITECURSOR);
  +             xx = rpmdbiCopen(dbi, rpmdbiTxnid(dbi), &dbcursor, 
DB_WRITECURSOR);
   
                memset(key, 0, sizeof(*key));
   /*@i@*/              key->data = (void *) DNEVR;
  @@ -1544,9 +1542,9 @@
                data->size = sizeof(rc);
   
                /*@-compmempass@*/
  -             xx = dbiPut(dbi, dbcursor, key, data, 0);
  +             xx = rpmdbiPut(dbi, dbcursor, key, data, 0);
                /*@=compmempass@*/
  -             xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR);
  +             xx = rpmdbiCclose(dbi, dbcursor, DB_WRITECURSOR);
            }
            if (xx)
                _cacheDependsRC = 0;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/librpm.vers
  ============================================================================
  $ cvs diff -u -r1.77.2.4 -r1.77.2.5 librpm.vers
  --- rpm/lib/librpm.vers       27 Feb 2016 20:36:51 -0000      1.77.2.4
  +++ rpm/lib/librpm.vers       27 Jun 2016 03:10:03 -0000      1.77.2.5
  @@ -38,7 +38,7 @@
       nplatpat;
       platpat;
       _print_pkts;
  -    _psm_debug;
  +    _rpmpsm_debug;
       _psm_threads;
       rpmalAdd;
       rpmalAddProvides;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/poptALL.c
  ============================================================================
  $ cvs diff -u -r2.144.2.13 -r2.144.2.14 poptALL.c
  --- rpm/lib/poptALL.c 28 Mar 2016 19:07:14 -0000      2.144.2.13
  +++ rpm/lib/poptALL.c 27 Jun 2016 03:10:03 -0000      2.144.2.14
  @@ -102,60 +102,40 @@
   extern int _print_pkts;
   
   /*@unchecked@*/
  -extern int _psm_debug;
  -/*@unchecked@*/
  -extern rpmioPool _psmPool;
  +extern int _rpmpsm_debug;
   
   /*@unchecked@*/
   extern int _psm_threads;
   
   /*@unchecked@*/
   extern int _rpmal_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmalPool;
   
   /*@unchecked@*/
   extern int _rpmds_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmdsPool;
   
   /*@unchecked@*/
          int _rpmfc_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmfcPool;
   
   /*@unchecked@*/
   extern int _rpmfi_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmfiPool;
   
   /*@unchecked@*/
   extern int _rpmgi_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmgiPool;
   
   /*@unchecked@*/
   extern int _rpmmi_debug;
   
   /*@unchecked@*/
   extern int _rpmps_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmpsPool;
   
   /*@unchecked@*/
   extern int _rpmsq_debug;
   
   /*@unchecked@*/
   extern int _rpmte_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmtePool;
  -/*@unchecked@*/
  -extern rpmioPool _rpmtsiPool;
   
   /*@unchecked@*/
   extern int _rpmts_debug;
  -/*@unchecked@*/
  -extern rpmioPool _rpmtsPool;
   
   /*@unchecked@*/
   extern int _rpmwf_debug;
  @@ -189,6 +169,7 @@
   /*@-readonlytrans@*/ /* argv loading prevents observer, xstrdup needed. */
   /*@unchecked@*/
   static const char *rpmpoptfiles = RPMPOPTFILES;
  +static const char *rpmMacrofilesSave;
   /*@=readonlytrans@*/
   
   /**
  @@ -492,7 +473,7 @@
        NULL, NULL},
    { "prtpkts", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_print_pkts, -1,
        N_("Display OpenPGP (RFC 2440/4880) parsing"), NULL},
  - { "psmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_psm_debug, -1,
  + { "psmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmpsm_debug, 
-1,
        N_("Debug Package State Machine"), NULL},
    { "psmthreads", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_psm_threads, 
-1,
        N_("Use threads for Package State Machine"), NULL},
  @@ -534,22 +515,16 @@
   /*@-nestedextern@*/
       extern rpmioPool _rpmjniPool;
       extern rpmioPool _rpmjsPool;
  -    extern rpmioPool _rpmrubyPool;
       extern rpmioPool _headerPool;
  -    extern rpmioPool _rpmmiPool;
  -    extern rpmioPool _dbiPool;
  -#if defined(HAVE_SQLITE3_H)  /* XXX test --with-sqlite=external */
  -    extern rpmioPool _scpPool;
  -#endif
  -    extern rpmioPool _rpmdbPool;
  -    extern rpmioPool _rpmmdbPool;
  -    extern rpmioPool _rpmrepoPool;
  -    extern rpmioPool _rpmwfPool;
       extern const char * evr_tuple_order;
       extern const char * evr_tuple_match;
       extern miRE evr_tuple_mire;
   /*@=nestedextern@*/
   
  +    /* If the value has changed, free the macro paths. */
  +    if (rpmMacrofiles != rpmMacrofilesSave)
  +     rpmMacrofiles = _free(rpmMacrofiles);
  +
   /*@-mods@*/
       evr_tuple_order = _free(evr_tuple_order);
       evr_tuple_match = _free(evr_tuple_match);
  @@ -561,37 +536,35 @@
       _rpmjniPool = rpmioFreePool(_rpmjniPool);
       _rpmjsI = rpmjsFree(_rpmjsI);
       _rpmjsPool = rpmioFreePool(_rpmjsPool);
  -    _rpmrubyI = rpmrubyFree(_rpmrubyI);
  -    _rpmrubyPool = rpmioFreePool(_rpmrubyPool);
  +    RPMIOPOOL_INTERP_FREE(ruby)
   
  -    _rpmmdbI = rpmmdbFree(_rpmmdbI);
  -    _rpmmdbPool = rpmioFreePool(_rpmmdbPool);
  +    RPMIOPOOL_INTERP_FREE(mdb)
   
  -    _rpmgiPool = rpmioFreePool(_rpmgiPool);
  -    _rpmmiPool = rpmioFreePool(_rpmmiPool);
  +    RPMIOPOOL_FREE(gi)
  +    RPMIOPOOL_FREE(mi)
   
  -    _psmPool = rpmioFreePool(_psmPool);
  -    _rpmtsiPool = rpmioFreePool(_rpmtsiPool);
  +    RPMIOPOOL_FREE(psm)
  +    RPMIOPOOL_FREE(tsi)
   
  -    _rpmtsPool = rpmioFreePool(_rpmtsPool);
  -    _rpmtePool = rpmioFreePool(_rpmtePool);
  -    _rpmpsPool = rpmioFreePool(_rpmpsPool);
  -    _rpmalPool = rpmioFreePool(_rpmalPool);
  +    RPMIOPOOL_FREE(ts)
  +    RPMIOPOOL_FREE(te)
  +    RPMIOPOOL_FREE(ps)
  +    RPMIOPOOL_FREE(al)
   
  -    _rpmfcPool = rpmioFreePool(_rpmfcPool);
  +    RPMIOPOOL_FREE(fc)
   
       rpmnsClean();
   
  -    _rpmdsPool = rpmioFreePool(_rpmdsPool);
  -    _rpmfiPool = rpmioFreePool(_rpmfiPool);
  +    RPMIOPOOL_FREE(ds)
  +    RPMIOPOOL_FREE(fi)
   
  -    _rpmwfPool = rpmioFreePool(_rpmwfPool);
  -    _rpmdbPool = rpmioFreePool(_rpmdbPool);
  -    _rpmrepoPool = rpmioFreePool(_rpmrepoPool);
  +    RPMIOPOOL_FREE(wf)
  +    RPMIOPOOL_FREE(db)
  +    RPMIOPOOL_FREE(repo)
   #if defined(HAVE_SQLITE3_H)  /* XXX test --with-sqlite=external */
  -    _scpPool = rpmioFreePool(_scpPool);
  +    RPMIOPOOL_FREE(scp)
   #endif
  -    _dbiPool = rpmioFreePool(_dbiPool);
  +    RPMIOPOOL_FREE(dbi)
       _headerPool = rpmioFreePool(_headerPool);
   /*@=onlyunqglobaltrans@*/
   /*@=mods@*/
  @@ -740,6 +713,7 @@
            break;
        }
       }
  +    rpmMacrofilesSave = rpmMacrofiles;       /* XXX Save initial value for 
exit. */
   
       /* XXX strip off the "lt-" prefix so that rpmpopt aliases "work". */
   {   static const char lt_[] = "lt-";
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.399.2.20 -r2.399.2.21 psm.c
  --- rpm/lib/psm.c     11 May 2015 21:10:16 -0000      2.399.2.20
  +++ rpm/lib/psm.c     27 Jun 2016 03:10:03 -0000      2.399.2.21
  @@ -79,7 +79,7 @@
   
   #define      _PSM_DEBUG      0
   /*@unchecked@*/
  -int _psm_debug = _PSM_DEBUG;
  +int _rpmpsm_debug = _PSM_DEBUG;
   /*@unchecked@*/
   int _psm_threads = 0;
   
  @@ -1857,29 +1857,12 @@
   }
   /*@=mustmod@*/
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _psmPool;
  -
  -static rpmpsm rpmpsmGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _psmPool, fileSystem, internalState @*/
  -     /*@modifies pool, _psmPool, fileSystem, internalState @*/
  -{
  -    rpmpsm psm;
  -
  -    if (_psmPool == NULL) {
  -     _psmPool = rpmioNewPool("psm", sizeof(*psm), -1, _psm_debug,
  -                     NULL, NULL, rpmpsmFini);
  -     pool = _psmPool;
  -    }
  -    psm = (rpmpsm) rpmioGetPool(pool, sizeof(*psm));
  -    memset(((char *)psm)+sizeof(psm->_item), 0, 
sizeof(*psm)-sizeof(psm->_item));
  -    return psm;
  -}
  +RPMIOPOOL_MODULE(psm)
   
   rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi)
   {
       static const char msg[] = "rpmpsmNew";
  -    rpmpsm psm = rpmpsmGetPool(_psmPool);
  +    rpmpsm psm = rpmpsmGetPool(_rpmpsmPool);
   
   /*@-assignexpose -castexpose @*/
       if (ts)  psm->ts = rpmtsLink(ts, msg);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.h
  ============================================================================
  $ cvs diff -u -r2.81.4.1 -r2.81.4.2 psm.h
  --- rpm/lib/psm.h     19 Jul 2014 23:33:03 -0000      2.81.4.1
  +++ rpm/lib/psm.h     27 Jun 2016 03:10:03 -0000      2.81.4.2
  @@ -17,7 +17,7 @@
   
   /*@-exportlocal@*/
   /*@unchecked@*/
  -extern int _psm_debug;
  +extern int _rpmpsm_debug;
   /*@=exportlocal@*/
   
   /**
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmal.c
  ============================================================================
  $ cvs diff -u -r2.76.4.4 -r2.76.4.5 rpmal.c
  --- rpm/lib/rpmal.c   15 Apr 2012 21:20:57 -0000      2.76.4.4
  +++ rpm/lib/rpmal.c   27 Jun 2016 03:10:03 -0000      2.76.4.5
  @@ -156,24 +156,7 @@
       rpmalFreeIndex(al);
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmalPool;
  -
  -static rpmal rpmalGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmdsPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmdsPool, fileSystem, internalState @*/
  -{
  -    rpmal al;
  -
  -    if (_rpmalPool == NULL) {
  -     _rpmalPool = rpmioNewPool("al", sizeof(*al), -1, _rpmal_debug,
  -                     NULL, NULL, rpmalFini);
  -     pool = _rpmalPool;
  -    }
  -    al = (rpmal) rpmioGetPool(pool, sizeof(*al));
  -    memset(((char *)al)+sizeof(al->_item), 0, sizeof(*al)-sizeof(al->_item));
  -    return al;
  -}
  +RPMIOPOOL_MODULE(al)
   
   rpmal rpmalNew(int delta)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  ============================================================================
  $ cvs diff -u -r2.170.2.34 -r2.170.2.35 rpmds.c
  --- rpm/lib/rpmds.c   25 Jun 2016 09:49:39 -0000      2.170.2.34
  +++ rpm/lib/rpmds.c   27 Jun 2016 03:10:04 -0000      2.170.2.35
  @@ -195,24 +195,7 @@
       ds->include = (miRE) mireFreeAll(ds->include, ds->ninclude);
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmdsPool;
  -
  -static rpmds rpmdsGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmdsPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmdsPool, fileSystem, internalState @*/
  -{
  -    rpmds ds;
  -
  -    if (_rpmdsPool == NULL) {
  -     _rpmdsPool = rpmioNewPool("ds", sizeof(*ds), -1, _rpmds_debug,
  -                     NULL, NULL, rpmdsFini);
  -     pool = _rpmdsPool;
  -    }
  -    ds = (rpmds) rpmioGetPool(pool, sizeof(*ds));
  -    memset(((char *)ds)+sizeof(ds->_item), 0, sizeof(*ds)-sizeof(ds->_item));
  -    return ds;
  -}
  +RPMIOPOOL_MODULE(ds)
   
   static /*@null@*/
   const char ** rpmdsDupArgv(/*@null@*/ const char ** argv, int argc)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  ============================================================================
  $ cvs diff -u -r1.75.2.27 -r1.75.2.28 rpmfc.c
  --- rpm/lib/rpmfc.c   24 Jun 2016 19:04:19 -0000      1.75.2.27
  +++ rpm/lib/rpmfc.c   27 Jun 2016 03:10:04 -0000      1.75.2.28
  @@ -2020,24 +2020,7 @@
   }
   /*@=mustmod@*/
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmfcPool = NULL;
  -
  -static rpmfc rpmfcGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmfcPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmfcPool, fileSystem, internalState @*/
  -{
  -    rpmfc fc;
  -
  -    if (_rpmfcPool == NULL) {
  -     _rpmfcPool = rpmioNewPool("fc", sizeof(*fc), -1, _rpmfc_debug,
  -                     NULL, NULL, rpmfcFini);
  -     pool = _rpmfcPool;
  -    }
  -    fc = (rpmfc) rpmioGetPool(pool, sizeof(*fc));
  -    memset(((char *)fc)+sizeof(fc->_item), 0, sizeof(*fc)-sizeof(fc->_item));
  -    return fc;
  -}
  +RPMIOPOOL_MODULE(fc)
   
   rpmfc rpmfcNew(void)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.160.4.6 -r2.160.4.7 rpmfi.c
  --- rpm/lib/rpmfi.c   10 May 2016 17:02:17 -0000      2.160.4.6
  +++ rpm/lib/rpmfi.c   27 Jun 2016 03:10:04 -0000      2.160.4.7
  @@ -1356,24 +1356,7 @@
       fi->h = NULL;
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmfiPool;
  -
  -static rpmfi rpmfiGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmfiPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmfiPool, fileSystem, internalState @*/
  -{
  -    rpmfi fi;
  -
  -    if (_rpmfiPool == NULL) {
  -     _rpmfiPool = rpmioNewPool("fi", sizeof(*fi), -1, _rpmfi_debug,
  -                     NULL, NULL, rpmfiFini);
  -     pool = _rpmfiPool;
  -    }
  -    fi = (rpmfi) rpmioGetPool(pool, sizeof(*fi));
  -    memset(((char *)fi)+sizeof(fi->_item), 0, sizeof(*fi)-sizeof(fi->_item));
  -    return fi;
  -}
  +RPMIOPOOL_MODULE(fi)
   
   /**
    * Convert hex to binary nibble.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmgi.c
  ============================================================================
  $ cvs diff -u -r2.75.2.14 -r2.75.2.15 rpmgi.c
  --- rpm/lib/rpmgi.c   11 Apr 2016 22:06:30 -0000      2.75.2.14
  +++ rpm/lib/rpmgi.c   27 Jun 2016 03:10:04 -0000      2.75.2.15
  @@ -537,24 +537,7 @@
   }
   /*@=mustmod@*/
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmgiPool;
  -
  -static rpmgi rpmgiGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmgiPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmgiPool, fileSystem, internalState @*/
  -{
  -    rpmgi gi;
  -
  -    if (_rpmgiPool == NULL) {
  -     _rpmgiPool = rpmioNewPool("gi", sizeof(*gi), -1, _rpmgi_debug,
  -                     NULL, NULL, rpmgiFini);
  -     pool = _rpmgiPool;
  -    }
  -    gi = (rpmgi) rpmioGetPool(pool, sizeof(*gi));
  -    memset(((char *)gi)+sizeof(gi->_item), 0, sizeof(*gi)-sizeof(gi->_item));
  -    return gi;
  -}
  +RPMIOPOOL_MODULE(gi)
   
   rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp, size_t keylen)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmps.c
  ============================================================================
  $ cvs diff -u -r2.35.4.2 -r2.35.4.3 rpmps.c
  --- rpm/lib/rpmps.c   11 May 2015 21:10:16 -0000      2.35.4.2
  +++ rpm/lib/rpmps.c   27 Jun 2016 03:10:04 -0000      2.35.4.3
  @@ -41,22 +41,7 @@
       ps->probs = _free(ps->probs);
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmpsPool;
  -
  -static rpmps rpmpsGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmpsPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmpsPool, fileSystem, internalState @*/
  -{
  -    rpmps ps = NULL;
  -
  -    if (_rpmpsPool == NULL) {
  -     _rpmpsPool = rpmioNewPool("ps", sizeof(*ps), -1, _rpmps_debug,
  -                     NULL, NULL, rpmpsFini);
  -     pool = _rpmpsPool;
  -    }
  -    return (rpmps) rpmioGetPool(pool, sizeof(*ps));
  -}
  +RPMIOPOOL_MODULE(ps)
   
   rpmps rpmpsCreate(void)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  ============================================================================
  $ cvs diff -u -r2.289.4.11 -r2.289.4.12 rpmrc.c
  --- rpm/lib/rpmrc.c   27 Feb 2016 21:48:02 -0000      2.289.4.11
  +++ rpm/lib/rpmrc.c   27 Jun 2016 03:10:04 -0000      2.289.4.12
  @@ -28,6 +28,7 @@
   
   #include <rpmcli.h>
   
  +#define      _RPMSYCK_INTERNAL
   #include <rpmsyck.h>
   
   #include "debug.h"
  @@ -563,11 +564,11 @@
       struct stat st;
       char *yaml;
       rpmsyck_node *tmp, node;
  -    rpmSyck cpuinfoYaml;
  +    rpmsyck cpuinfoYaml;
       FD_t fd;
   
       _cpuinfo_path = rpmGetPath("%{?_rpmhome}%{!?_rpmhome:" USRLIBRPM 
"}/cpuinfo.yaml", NULL);
  -    if(Stat(_cpuinfo_path, &st))
  +    if (Stat(_cpuinfo_path, &st))
        return rc;
   
       fd = Fopen(_cpuinfo_path, "r");
  @@ -577,7 +578,7 @@
       Fclose(fd);
   
       xx = rpmdsCpuinfo(&cpuinfoP, NULL);
  -    cpuinfoYaml = rpmSyckLoad(yaml);
  +    cpuinfoYaml = rpmsyckLoad(yaml);
       yaml = _free(yaml);
       htGetEntry(cpuinfoYaml->firstNode->value.map, "cpuinfo", &tmp, NULL, 
NULL);
       node = tmp[0]->value.seq;
  @@ -646,7 +647,7 @@
        }
       }
   
  -    cpuinfoYaml = rpmSyckFree(cpuinfoYaml);
  +    cpuinfoYaml = rpmsyckFree(cpuinfoYaml);
   
       xx = mireAppend(RPMMIRE_REGEX, 0, "noarch", NULL, &mi_re, &mi_nre);
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmte.c
  ============================================================================
  $ cvs diff -u -r2.109.2.3 -r2.109.2.4 rpmte.c
  --- rpm/lib/rpmte.c   15 Apr 2012 21:20:58 -0000      2.109.2.3
  +++ rpm/lib/rpmte.c   27 Jun 2016 03:10:04 -0000      2.109.2.4
  @@ -223,24 +223,7 @@
       delTE(te);
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmtePool;
  -
  -static rpmte rpmteGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmtePool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmtePool, fileSystem, internalState @*/
  -{
  -    rpmte te;
  -
  -    if (_rpmtePool == NULL) {
  -     _rpmtePool = rpmioNewPool("te", sizeof(*te), -1, _rpmte_debug,
  -                     NULL, NULL, rpmteFini);
  -     pool = _rpmtePool;
  -    }
  -    te = (rpmte) rpmioGetPool(pool, sizeof(*te));
  -    memset(((char *)te)+sizeof(te->_item), 0, sizeof(*te)-sizeof(te->_item));
  -    return te;
  -}
  +RPMIOPOOL_MODULE(te)
   
   rpmte rpmteNew(const rpmts ts, Header h,
                rpmElementType type,
  @@ -769,24 +752,8 @@
   }
   /*@=mustmod@*/
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmtsiPool;
  -
  -static rpmtsi rpmtsiGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmtsiPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmtsiPool, fileSystem, internalState @*/
  -{
  -    rpmtsi tsi;
  -
  -    if (_rpmtsiPool == NULL) {
  -     _rpmtsiPool = rpmioNewPool("tsi", sizeof(*tsi), -1, _rpmte_debug,
  -                     NULL, NULL, rpmtsiFini);/* XXX _rpmtsi_debug? */
  -     pool = _rpmtsiPool;
  -    }
  -    tsi = (rpmtsi) rpmioGetPool(pool, sizeof(*tsi));
  -    memset(((char *)tsi)+sizeof(tsi->_item), 0, 
sizeof(*tsi)-sizeof(tsi->_item));
  -    return tsi;
  -}
  +#define      _rpmtsi_debug   _rpmte_debug
  +RPMIOPOOL_MODULE(tsi)
   
   rpmtsi XrpmtsiInit(rpmts ts, const char * fn, unsigned int ln)
   {
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  ============================================================================
  $ cvs diff -u -r2.188.2.16 -r2.188.2.17 rpmts.c
  --- rpm/lib/rpmts.c   25 Jun 2016 09:49:39 -0000      2.188.2.16
  +++ rpm/lib/rpmts.c   27 Jun 2016 03:10:04 -0000      2.188.2.17
  @@ -167,7 +167,7 @@
        rc = 0;
       }
   
  -  { dbiIndex dbi;
  +  { rpmdbi dbi;
       size_t dbix;
       for (dbix = 0; dbix < db->db_ndbi; dbix++) {
        tagStore_t dbiTags = &db->db_tags[dbix];
  @@ -197,7 +197,7 @@
        }
   
        /* Open (and re-create) each index. */
  -     dbi = dbiOpen(db, dbiTags->tag, db->db_flags);
  +     dbi = rpmdbiOpen(db, dbiTags->tag, db->db_flags);
        if (dbi == NULL)
            rc += 1;
       }
  @@ -215,7 +215,7 @@
       fn = rpmGetPath(db->db_root, db->db_home, "/Seqno", NULL);
       if (!Stat(fn, &sb))
        xx = Unlink(fn);
  -    (void) dbiOpen(db, RPMDBI_SEQNO, db->db_flags);
  +    (void) rpmdbiOpen(db, RPMDBI_SEQNO, db->db_flags);
       fn = _free(fn);
   
       rc = rpmtxnCheckpoint(db);
  @@ -803,24 +803,7 @@
       }
   }
   
  -/*@unchecked@*/ /*@only@*/ /*@null@*/
  -rpmioPool _rpmtsPool;
  -
  -static rpmts rpmtsGetPool(/*@null@*/ rpmioPool pool)
  -     /*@globals _rpmtsPool, fileSystem, internalState @*/
  -     /*@modifies pool, _rpmtsPool, fileSystem, internalState @*/
  -{
  -    rpmts ts;
  -
  -    if (_rpmtsPool == NULL) {
  -     _rpmtsPool = rpmioNewPool("ts", sizeof(*ts), -1, _rpmts_debug,
  -                     NULL, NULL, rpmtsFini);
  -     pool = _rpmtsPool;
  -    }
  -    ts = (rpmts) rpmioGetPool(pool, sizeof(*ts));
  -    memset(((char *)ts)+sizeof(ts->_item), 0, sizeof(*ts)-sizeof(ts->_item));
  -    return ts;
  -}
  +RPMIOPOOL_MODULE(ts)
   
   void * rpmtsGetKeyring(rpmts ts, /*@unused@*/ int autoload)
   {
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to