All comments/suggestions/problems are welcome
- Copyright (c) 1995-2013 Paul Marquess. All rights reserved.
+ Copyright (c) 1995-2018 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
# include "ppport.h"
#endif
+int DB_File___unused() { return 0; }
+
/* Mention DB_VERSION_MAJOR_CFG, DB_VERSION_MINOR_CFG, and
DB_VERSION_PATCH_CFG here so that Configure pulls them all in. */
# ifdef __cplusplus
# define dNOOP (void)0
# else
-# define dNOOP extern int DB_File___notused
+# define dNOOP extern int DB_File___notused()
# endif
/* Ditto for dXSARGS. */
#if DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 5
# define R_SETCURSOR 0x800000
#else
-# define R_SETCURSOR (-100)
+# define R_SETCURSOR (DB_OPFLAGS_MASK)
#endif
#define R_RECNOSYNC 0
#if DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR < 5
# define flagSet(flags, bitmask) ((flags) & (bitmask))
#else
-# define flagSet(flags, bitmask) (((flags) & DB_OPFLAGS_MASK) == (bitmask))
+# define flagSet(flags, bitmask) (((flags) & DB_OPFLAGS_MASK) == (u_int)(bitmask))
#endif
#else /* db version 1.x */
if (flagSet(flags, R_CURSOR)) {
return ((db->cursor)->c_put)(db->cursor, &key, &value, DB_CURRENT);
}
-
if (flagSet(flags, R_SETCURSOR)) {
if ((db->dbp)->put(db->dbp, NULL, &key, &value, 0) != 0)
return -1 ;
#ifdef AT_LEAST_DB_3_2
PERL_UNUSED_ARG(db);
#endif
+#ifdef AT_LEAST_DB_6_0
+ PERL_UNUSED_ARG(locp);
+#endif
if (CurrentDB->in_compare) {
tidyUp(CurrentDB);
value = (int)SvIV(*svp) ;
if (fixed) {
- status = dbp->set_re_pad(dbp, value) ;
+ (void)dbp->set_re_pad(dbp, value) ;
}
else {
- status = dbp->set_re_delim(dbp, value) ;
+ (void)dbp->set_re_delim(dbp, value) ;
}
}
svp = hv_fetch(action, "reclen", 6, FALSE);
if (svp) {
u_int32_t len = my_SvUV32(*svp) ;
- status = dbp->set_re_len(dbp, len) ;
+ (void)dbp->set_re_len(dbp, len) ;
}
}
if (name != NULL) {
- status = dbp->set_re_source(dbp, name) ;
+ (void)dbp->set_re_source(dbp, name) ;
name = NULL ;
}
name = NULL ;
- status = dbp->set_flags(dbp, (u_int32_t)DB_RENUMBER) ;
+ (void)dbp->set_flags(dbp, (u_int32_t)DB_RENUMBER) ;
if (flags){
(void)dbp->set_flags(dbp, (u_int32_t)flags) ;
#endif
#ifdef WANT_ERROR
SV * sv_err = perl_get_sv(ERR_BUFF, GV_ADD|GV_ADDMULTI) ;
- PERL_UNUSED_VAR(sv_err); /* huh? we just retrieved it... */
#endif
MY_CXT_INIT;
+#ifdef WANT_ERROR
+ PERL_UNUSED_VAR(sv_err); /* huh? we just retrieved it... */
+#endif
__getBerkeleyDBInfo() ;
DBT_clear(empty) ;