aboutsummaryrefslogtreecommitdiff
path: root/lib/mf-dbm.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mf-dbm.h')
-rw-r--r--lib/mf-dbm.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/lib/mf-dbm.h b/lib/mf-dbm.h
deleted file mode 100644
index 415e010b..00000000
--- a/lib/mf-dbm.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* This file is part of Mailfromd.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2006, 2007, 2008, 2009,
- 2010 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <mailutils/stream.h>
-
-typedef struct mf_dbm_file MF_DBM_FILE;
-
-#if defined(WITH_GDBM)
-
-#include <gdbm.h>
-#define USE_DBM
-struct mf_dbm_file {
- char *name;
- GDBM_FILE db;
-};
-typedef datum MF_DBM_DATUM;
-#define MF_DATUM_SIZE(d) (d).dsize
-#define MF_DATUM_PTR(d) (d).dptr
-
-#elif defined(WITH_BDB)
-
-#include <db.h>
-#define USE_DBM
-
-struct mf_dbm_file {
- char *name;
- int lockfd;
- char *lockname;
- DB *db;
- DBC *dbc;
-};
-
-typedef DBT MF_DBM_DATUM;
-#define MF_DATUM_SIZE(d) (d).size
-#define MF_DATUM_PTR(d) (d).data
-
-#endif
-
-#ifdef USE_DBM
-struct stat;
-int mf_dbm_stat(char *name, struct stat *sb);
-int mf_dbm_open(char *name, MF_DBM_FILE *db, int flags, int mode, int *ro);
-int mf_dbm_close(MF_DBM_FILE *db);
-int mf_dbm_fetch(MF_DBM_FILE *db, MF_DBM_DATUM key, MF_DBM_DATUM *ret);
-int mf_dbm_insert(MF_DBM_FILE *db, MF_DBM_DATUM key, MF_DBM_DATUM contents, int replace);
-int mf_dbm_delete(MF_DBM_FILE *db, MF_DBM_DATUM key);
-int mf_dbm_firstkey(MF_DBM_FILE *db, MF_DBM_DATUM *pkey);
-int mf_dbm_nextkey(MF_DBM_FILE *db, MF_DBM_DATUM key, MF_DBM_DATUM *pkey);
-void mf_dbm_datum_free(MF_DBM_DATUM *datum);
-const char *mf_dbm_strerror(void);
-#else
-# define mf_dbm_datum_free(datum)
-#endif
-
-int mf_fcheck_perm(int fd, int mode);
-int mf_check_perm(const char *name, int mode);
-
-void libdbm_init(void);
-
-extern size_t lock_retry_count_option;
-extern time_t lock_retry_timeout_option;

Return to:

Send suggestions and report system problems to the System administrator.