make _offset an fpos_t so we can do 64-bit seeks
[unix-history] / usr / src / include / ndbm.h
index d7a2473..a3a56bf 100644 (file)
@@ -7,25 +7,34 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ndbm.h      5.4 (Berkeley) %G%
+ *     @(#)ndbm.h      5.8 (Berkeley) %G%
  */
 
  */
 
-#include <sys/cdefs.h>
+#ifndef _NDBM_H_
+#define        _NDBM_H_
+
 #include <db.h>
 
 #include <db.h>
 
-/* Map dbm interface onto hash(3). */
+/* Map dbm interface onto db(3). */
 #define DBM_RDONLY     O_RDONLY
 
 /* Flags to dbm_store(). */
 #define DBM_INSERT      0
 #define DBM_REPLACE     1
 
 #define DBM_RDONLY     O_RDONLY
 
 /* Flags to dbm_store(). */
 #define DBM_INSERT      0
 #define DBM_REPLACE     1
 
+/*
+ * The db(3) support for ndbm(3) always appends this suffix to the
+ * file name to avoid overwriting the user's original database.
+ */
+#define        DBM_SUFFIX      ".db"
+
 typedef struct {
        char *dptr;
        int dsize;
 } datum;
 
 typedef DB DBM;
 typedef struct {
        char *dptr;
        int dsize;
 } datum;
 
 typedef DB DBM;
+#define        dbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
 
 __BEGIN_DECLS
 void    dbm_close __P((DBM *));
 
 __BEGIN_DECLS
 void    dbm_close __P((DBM *));
@@ -36,4 +45,7 @@ long   dbm_forder __P((DBM *, datum));
 datum   dbm_nextkey __P((DBM *));
 DBM    *dbm_open __P((const char *, int, int));
 int     dbm_store __P((DBM *, datum, datum, int));
 datum   dbm_nextkey __P((DBM *));
 DBM    *dbm_open __P((const char *, int, int));
 int     dbm_store __P((DBM *, datum, datum, int));
+int     dbm_dirfno __P((DBM *));
 __END_DECLS
 __END_DECLS
+
+#endif /* !_NDBM_H_ */