Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
databases/ruby-bdb: fix build with clang16, fix build with ruby3.2
- Loading branch information
Dirk Meyer
authored and
Dirk Meyer
committed
Jul 13, 2023
1 parent
e257787
commit 5ebb183
Showing
12 changed files
with
1,582 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- bdbxml2/bdbxml.h.orig 2011-04-06 19:35:39 UTC | ||
+++ bdbxml2/bdbxml.h | ||
@@ -377,7 +377,7 @@ | ||
@@ -377,7 +377,7 @@ get_mod(VALUE obj) | ||
static inline void | ||
rset_obj(VALUE obj) | ||
{ | ||
- RBASIC(obj)->klass = rb_cData; | ||
+ RBASIC_SET_CLASS_RAW(obj, rb_cData); | ||
+ RBASIC_SET_CLASS_RAW(obj, rb_cObject); | ||
RDATA(obj)->dfree = (RDF)free; | ||
RDATA(obj)->dmark = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
--- src/bdb.c.orig 2011-04-06 19:35:39 UTC | ||
+++ src/bdb.c | ||
@@ -166,11 +166,10 @@ | ||
@@ -165,12 +165,11 @@ Init_bdb() | ||
if (rb_const_defined_at(rb_cObject, rb_intern("BDB"))) { | ||
rb_raise(rb_eNameError, "module already defined"); | ||
} | ||
version = rb_tainted_str_new2(db_version(&major, &minor, &patch)); | ||
- version = rb_tainted_str_new2(db_version(&major, &minor, &patch)); | ||
- if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR | ||
- || patch != DB_VERSION_PATCH) { | ||
- rb_raise(rb_eNotImpError, "\nBDB needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d.%d and libdb version %d.%d.%d\n", | ||
- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, | ||
- major, minor, patch); | ||
+ version = rb_str_new_cstr(db_version(&major, &minor, &patch)); | ||
+ if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR) { | ||
+ rb_raise(rb_eNotImpError, "\nBDB needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d and libdb version %d.%d\n", | ||
+ DB_VERSION_MAJOR, DB_VERSION_MINOR, | ||
+ major, minor); | ||
} | ||
bdb_mMarshal = rb_const_get(rb_cObject, rb_intern("Marshal")); | ||
bdb_id_current_db = rb_intern("__bdb_current_db__"); | ||
@@ -958,7 +957,7 @@ Init_bdb() | ||
bdb_init_delegator(); | ||
bdb_init_sequence(); | ||
|
||
- bdb_errstr = rb_tainted_str_new(0, 0); | ||
+ bdb_errstr = rb_str_new(0, 0); | ||
rb_global_variable(&bdb_errstr); | ||
|
||
} |
Oops, something went wrong.