This is patch.2b1d to perl5.002beta1.
[p5sagit/p5-mst-13.2.git] / ext / GDBM_File / GDBM_File.xs
index 0a0b717..5567020 100644 (file)
@@ -16,6 +16,7 @@ typedef GDBM_FILE GDBM_File;
 #define gdbm_DELETE(db,key)                    gdbm_delete(db,key)
 #define gdbm_FIRSTKEY(db)                      gdbm_firstkey(db)
 #define gdbm_NEXTKEY(db,key)                   gdbm_nextkey(db,key)
+#define gdbm_EXISTS(db,key)                    gdbm_exists(db,key)
 
 typedef datum gdatum;
 
@@ -29,6 +30,16 @@ char *s;
     return -1;
 }
 
+/* Versions of gdbm prior to 1.7x might not have the gdbm_sync,
+   gdbm_exists, and gdbm_setopt functions.  Apparently Slackware
+   (Linux) 2.1 contains gdbm-1.5 (which dates back to 1991).
+*/
+#ifndef GDBM_FAST
+#define gdbm_exists(db,key) not_here("gdbm_exists")
+#define gdbm_sync(db) (void) not_here("gdbm_sync")
+#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
+#endif
+
 static double
 constant(name, arg)
 char *name;