5eb95260ec
- update to 5.34.0 * Experimental Try/Catch Syntax * Blanks freely allowed within but adjacent to curly braces * New octal syntax 0oddddd * Fix a memory leak in RegEx [GH #18604] * ExtUtils::PL2Bat 0.004 has been added to the Perl core. * Updated Modules and Pragmata - Rebase perl-5.28.0.dif to perl-5.34.0.dif - Rebase perl-incfix.diff - Rebase perl_skip_flaky_tests_powerpc.patch - Drop perl-gdbm-test-no-mmap.diff (no longer needed with gdbm 1.20) - Add c029d660f2fe60699cf64bbb3fa9f671a1a370d5.patch to fix build with gdbm 1.20 - Drop perl-fix2020.patch (included upstream) OBS-URL: https://build.opensuse.org/request/show/915813 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=204
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From c029d660f2fe60699cf64bbb3fa9f671a1a370d5 Mon Sep 17 00:00:00 2001
|
|
From: Sergey Poznyakoff <gray@gnu.org>
|
|
Date: Wed, 23 Jun 2021 00:15:54 +0300
|
|
Subject: [PATCH] Fix GDBM_File to compile with version 1.20 and earlier
|
|
|
|
* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
|
|
depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
|
|
Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
|
|
gdbm commit d3e27957).
|
|
---
|
|
ext/GDBM_File/GDBM_File.xs | 11 +++++------
|
|
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
|
|
index cd0bb6f26ffa..494c2889ca89 100644
|
|
--- a/ext/GDBM_File/GDBM_File.xs
|
|
+++ b/ext/GDBM_File/GDBM_File.xs
|
|
@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
|
|
#define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
|
|
#endif
|
|
|
|
-#ifndef GDBM_ITEM_NOT_FOUND
|
|
-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
|
|
-#endif
|
|
-
|
|
+#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
|
|
/* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
|
|
if the requested key did not exist */
|
|
-#define ITEM_NOT_FOUND() \
|
|
- (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
|
|
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_NO_ERROR)
|
|
+#else
|
|
+# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_ITEM_NOT_FOUND)
|
|
+#endif
|
|
|
|
#define CHECKDB(db) do { \
|
|
if (!db->dbp) { \
|