1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 16:31:47 +02:00

* FreeBSD / gcc 2.95 compatibility fixes.

* A script to generate prebuilt registration scripts.
This commit is contained in:
Eelco Dolstra 2003-04-08 14:05:15 +00:00
parent f7ef88df1f
commit cc6eafb3d0
4 changed files with 50 additions and 36 deletions

View file

@ -6,11 +6,12 @@
#include <map>
#include <cstdio>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <db4/db_cxx.h>
#include <db_cxx.h>
extern "C" {
#include <aterm1.h>
@ -48,9 +49,7 @@ public:
auto_ptr<Db2> openDB(const string & dbname, bool readonly)
{
auto_ptr<Db2> db;
db = auto_ptr<Db2>(new Db2(0, 0));
auto_ptr<Db2> db(new Db2(0, 0));
db->open((nixHomeDir + "/var/nix/pkginfo.db").c_str(), dbname.c_str(),
DB_HASH, readonly ? DB_RDONLY : DB_CREATE, 0666);