Re: Trouble building 2.49.60 beta on Fedora - gdbm
Bruno Haible <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <7408189.dfEi4yvz35@omega> |
Hello Jerry,
Thanks for the detailed reports!
I'll reply for each of the issues separately.
> Finally, I needed the
> attached patch to build successfully with gdbm 1.13.
Thanks for the report. I'll use this patch (in order to continue supporting
gdbm 1.8.3).
Bruno
diff -r 5b5ef50761bd modules/gdbm/gdbm.c
--- a/modules/gdbm/gdbm.c Sun Jun 25 11:46:27 2017 +0200
+++ b/modules/gdbm/gdbm.c Sun Aug 20 07:08:22 2017 +0200
@@ -66,7 +66,7 @@
READER-CANT-REORGANIZE UNKNOWN-UPDATE ITEM-NOT-FOUND \
REORGANIZE-FAILED CANNOT-REPLACE ILLEGAL-DATA OPT-ALREADY-SET \
OPT-ILLEGAL)
-static _Noreturn void error_gdbm (char *fatal_message) {
+static _Noreturn void error_gdbm (const char *fatal_message) {
end_blocking_system_call(); /* in case we are called from _gdbm_fatal() */
pushSTACK(`GDBM::GDBM-ERROR`);
pushSTACK(`:MESSAGE`);
@@ -124,10 +124,16 @@
static object open_gdbm (object path, int bsize, int rw, int mode) {
GDBM_FILE gdbm;
+ /* gdbm versions < 1.9 had a broken prototype of gdbm_open() in gdbm.h. */
+ #if !defined(GDBM_OPENMASK) && defined(__cplusplus)
with_string_0(path, GLO(pathname_encoding), name, {
- SYSCALL(gdbm = gdbm_open(name, bsize, rw, mode,
- (void (*)(void))error_gdbm));
- });
+ SYSCALL(gdbm = gdbm_open(name, bsize, rw, mode, (void (*) (void)) error_gdbm));
+ });
+ #else
+ with_string_0(path, GLO(pathname_encoding), name, {
+ SYSCALL(gdbm = gdbm_open(name, bsize, rw, mode, error_gdbm));
+ });
+ #endif
if (gdbm == NULL) error_gdbm(NULL);
return allocate_fpointer(gdbm);
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel