#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef I_DBM
# include <dbm.h>
#else
# ifdef I_RPCSVC_DBM
# endif
#endif
#ifndef HAS_DBMINIT_PROTO
int dbmclose(void);
#endif
#ifdef DBM_BUG_DUPLICATE_FREE
/*
* DBM on at least Ultrix and HPUX call dbmclose() from dbminit(),
* resulting in duplicate free() because dbmclose() does *not*
* check if it has already been called for this DBM.
* the next dbminit(), the memory might be used for something else when
* it is freed.
* Set DBM_BUG_DUPLICATE_FREE in the extension hint file.
*/
/* Close the previous dbm, and fail to open a new dbm */
#endif
#include <fcntl.h>
typedef struct {
void * dbp ;
SV * filter_fetch_key ;
SV * filter_store_key ;
SV * filter_fetch_value ;
SV * filter_store_value ;
int filtering ;
typedef ODBM_File_type * ODBM_File ;
typedef datum datum_key_copy ;
typedef datum datum_value ;
typedef struct {
int x_dbmrefcnt;
} my_cxt_t;
#ifndef DBM_REPLACE
#define DBM_REPLACE 0
#endif
BOOT:
{
}
char * dbtype
char * filename
int flags
int mode
CODE:
{
char *tmpbuf;
void * dbp ;
if (dbmrefcnt++)
croak("Old dbm can only open one database");
}
else
}
}
void
CODE:
dbmrefcnt--;
dbmclose();
int
int flags
if (RETVAL) {
croak("No write permission to odbm file");
croak("odbm store returned %d, errno %d, key \"%s\"",
}
int
{ \
} \
else if (code) { \
else \
} \
}
SV *
CODE:
SV *
CODE:
SV *
CODE:
SV *
CODE: