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

  Server: rpm5.org                         Name:   Arkadiusz Miskiewicz
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: rpm                              Date:   29-Jul-2008 16:54:31
  Branch: HEAD                             Handle: 2008072914543000

  Modified files:
    rpm/rpmdb               Makefile.am rpmdb.h

  Log:
    Partial workaround for: #if defined(WITH_DB) #include <something> #else 
#include <somethingelse> #endif.
    Doing this type of checks in public header is wrong because WITH_DB won't 
be defined in some custom
    program (that uses this public header) build process. TODO: add make 
dependency so db.h will be generated
    at build time instead of install time.

  Summary:
    Revision    Changes     Path
    1.100       +4  -1      rpm/rpmdb/Makefile.am
    1.75        +1  -5      rpm/rpmdb/rpmdb.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  ============================================================================
  $ cvs diff -u -r1.99 -r1.100 Makefile.am
  --- rpm/rpmdb/Makefile.am     19 Jul 2008 13:52:23 -0000      1.99
  +++ rpm/rpmdb/Makefile.am     29 Jul 2008 14:54:30 -0000      1.100
  @@ -105,7 +105,10 @@
   if WITH_DB_INTERNAL
   my_DB_HEADER = $(top_builddir)/$(WITH_DB_SUBDIR)/db.h
   else
  -my_DB_HEADER = $(srcdir)/db_emu.h
  +my_DB_HEADER = $(srcdir)/db.h
  +
  +$(my_DB_HEADER): $(srcdir)/db_emu.h
  +     $(pkgincHEADERS_INSTALL) $(srcdir)/db_emu.h $(srcdir)/db.h
   endif
   
   install-data-local:
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.h
  ============================================================================
  $ cvs diff -u -r1.74 -r1.75 rpmdb.h
  --- rpm/rpmdb/rpmdb.h 23 May 2008 16:26:19 -0000      1.74
  +++ rpm/rpmdb/rpmdb.h 29 Jul 2008 14:54:30 -0000      1.75
  @@ -10,11 +10,7 @@
   #include <assert.h>
   #include <rpmlib.h>
   #include <mire.h>
  -#if defined(WITH_DB)
  -#include "db.h"
  -#else
  -#include "db_emu.h"
  -#endif
  +#include <db.h>
   
   /[EMAIL PROTECTED]@*/
   /[EMAIL PROTECTED]@*/
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to