ee7159118d5ffaaad52bd51b0f1433bdf6b01f67
[m6w6/ext-psi] / m4 / posix / ndbm.m4
1 PSI_CHECK_NDBM() {
2 PSI_CONFIG_POSIX(ndbm, dnl
3 ndbm.h dnl posix
4 relic.h dnl qdbm
5 gdbm-ndbm.h dnl gdbm
6 )
7
8 PSI_STRUCT(datum, [
9 void *dptr,
10 int dsize]
11 )
12
13 PSI_OPAQUE_TYPE(DBM)
14
15 PSI_CONST(DBM_INSERT, int)
16 PSI_CONST(DBM_REPLACE, int)
17
18 PSI_DECL(void dbm_clearerr, [(DBM *db)], [], [-lqdbm -lgdbm_compat])
19 PSI_DECL(void dbm_close, [(DBM *db)], [], [-lqdbm -lgdbm_compat])
20 PSI_DECL(int dbm_delete, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat])
21 PSI_DECL(int dbm_error, [(DBM *db)], [], [-lqdbm -lgdbm_compat])
22 PSI_DECL(datum dbm_fetch, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat])
23 PSI_DECL(datum dbm_firstkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat])
24 PSI_DECL(datum dbm_nextkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat])
25 PSI_DECL(DBM *dbm_open, [(char *file, int open_flags, mode_t file_mode)], [], [-lqdbm -lgdbm_compat])
26 PSI_DECL(int dbm_store, [(DBM *db, datum key, datum content, int store_mode)], [], [-lqdbm -lgdbm_compat])
27
28 # See http://www.gnu.org.ua/software/gdbm/manual/html_section/gdbm_19.html
29 if expr X"$LIBS" : "X.*-lgdbm_compat" >/dev/null; then
30 LIBS="-lgdbm $LIBS"
31 fi
32 }