updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / nvi-unicode / db47-hack.patch
blobf2f206beaeae7cf8e0e54a5ba250b4f57fc08f36
1 diff --git a/cl/cl_main.c b/cl/cl_main.c
2 index 0ecbe44..87feb28 100644
3 --- a/cl/cl_main.c
4 +++ b/cl/cl_main.c
5 @@ -57,6 +57,9 @@ main(int argc, char **argv)
6 int rval;
7 char **p_av, **t_av, *ttype;
9 + /* Hack for db-4.7. */
10 + unsetenv("LANG");
11 + unsetenv("LC_ALL");
12 /* If loaded at 0 and jumping through a NULL pointer, stop. */
13 if (reenter++)
14 abort();
15 diff --git a/common/db.h b/common/db.h
16 index fd1dc64..00a7ce7 100644
17 --- a/common/db.h
18 +++ b/common/db.h
19 @@ -18,7 +18,7 @@
21 #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
22 #define db_open(db,file,type,flags,mode) \
23 - (db)->open(db, NULL, file, NULL, type, flags, mode)
24 + (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode)
25 #else
26 #define db_open(db,file,type,flags,mode) \
27 (db)->open(db, file, NULL, type, flags, mode)