Add support for global LDFLAGS
[platform/upstream/rpm.git] / packaging / db-4.8.30-integration.dif
1 --- db/db/db.c.orig     2010-04-12 20:25:22.000000000 +0000
2 +++ db/db/db.c  2011-05-12 11:38:59.000000000 +0000
3 @@ -646,6 +646,8 @@ __env_mpool(dbp, fname, flags)
4                         MAKE_INMEM(dbp);
5                 return (ret);
6         }
7 +       if (LF_ISSET(DB_NOFSYNC) && mpf->mfp)
8 +           F_SET(mpf->mfp, MP_NOFSYNC);
9  
10         /*
11          * Set the open flag.  We use it to mean that the dbp has gone
12 --- db/db/db_iface.c.orig       2010-04-12 20:25:22.000000000 +0000
13 +++ db/db/db_iface.c    2011-05-12 11:21:32.000000000 +0000
14 @@ -1230,6 +1230,7 @@ __db_open_arg(dbp, txn, fname, dname, ty
15  #define        OKFLAGS                                                         \
16         (DB_AUTO_COMMIT | DB_CREATE | DB_EXCL | DB_FCNTL_LOCKING |      \
17         DB_MULTIVERSION | DB_NOMMAP | DB_NO_AUTO_COMMIT | DB_RDONLY |   \
18 +       DB_NOFSYNC |                                                    \
19         DB_RDWRMASTER | DB_READ_UNCOMMITTED | DB_THREAD | DB_TRUNCATE)
20         if ((ret = __db_fchk(env, "DB->open", flags, OKFLAGS)) != 0)
21                 return (ret);
22 --- db/dbinc/mp.h.orig  2010-04-12 20:25:22.000000000 +0000
23 +++ db/dbinc/mp.h       2011-05-12 12:01:32.000000000 +0000
24 @@ -467,6 +467,7 @@ struct __mpoolfile {
25  #define        MP_FAKE_UOC             0x080   /* Unlink_on_close field: fake flag. */
26  #define        MP_NOT_DURABLE          0x100   /* File is not durable. */
27  #define        MP_TEMP                 0x200   /* Backing file is a temporary. */
28 +#define        MP_NOFSYNC              0x400   /* Don't fsync */
29         u_int32_t  flags;
30  };
31  
32 --- db/dbinc_auto/api_flags.in.orig     2011-05-12 11:40:57.000000000 +0000
33 +++ db/dbinc_auto/api_flags.in  2011-05-12 11:55:10.000000000 +0000
34 @@ -83,6 +83,7 @@
35  #define        DB_NOORDERCHK                           0x00000002
36  #define        DB_NOPANIC                              0x00000800
37  #define        DB_NO_AUTO_COMMIT                       0x00001000
38 +#define        DB_NOFSYNC                              0x00040000
39  #define        DB_ODDFILESIZE                          0x00000080
40  #define        DB_ORDERCHKONLY                         0x00000004
41  #define        DB_OVERWRITE                            0x00001000
42 --- db/dist/s_config.orig       2010-04-12 20:25:23.000000000 +0000
43 +++ db/dist/s_config    2011-05-12 12:00:34.000000000 +0000
44 @@ -8,7 +8,8 @@ trap 'rm -f aclocal.m4 ; exit 0' 0 1 2 3
45  . ./RELEASE
46  
47  echo "autoconf: building aclocal.m4..."
48 -cat aclocal/*.m4 aclocal_java/*.m4 > aclocal.m4
49 +cat aclocal/*.m4 aclocal_java/*.m4 > acinclude.m4
50 +aclocal
51  
52  echo "autoconf: running autoheader to build config.hin..."
53  rm -f config.hin
54 --- db/mp/mp_sync.c.orig        2010-04-12 20:25:34.000000000 +0000
55 +++ db/mp/mp_sync.c     2011-05-12 11:36:58.000000000 +0000
56 @@ -578,7 +578,7 @@ done:       /*
57         if (ret == 0 && required_write) {
58                 if (dbmfp == NULL)
59                         ret = __memp_sync_files(env);
60 -               else
61 +               else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
62                         ret = __os_fsync(env, dbmfp->fhp);
63         }
64  
65 @@ -665,7 +665,7 @@ __memp_sync_file(env, mfp, argp, countp,
66                             "%s: unable to flush", (char *)
67                             R_ADDR(dbmp->reginfo, mfp->path_off));
68                 }
69 -       } else
70 +       } else if (!F_ISSET(dbmfp->mfp, MP_NOFSYNC))
71                 ret = __os_fsync(env, dbmfp->fhp);
72  
73         /*
74 @@ -801,6 +801,8 @@ __memp_mf_sync(dbmp, mfp, locked)
75         COMPQUIET(hp, NULL);
76         env = dbmp->env;
77  
78 +       if (F_ISSET(mfp, MP_NOFSYNC))
79 +           return 0;
80         /*
81          * We need to be holding the hash lock: we're using the path name
82          * and __memp_nameop might try and rename the file.