Compare commits
2 Commits
Author | SHA256 | Date | |
---|---|---|---|
6a8207c0d7 | |||
e2c7fc2edf |
139
gdbm-gcc15.patch
Normal file
139
gdbm-gcc15.patch
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
Index: gdbm-1.24/tools/var.c
|
||||||
|
===================================================================
|
||||||
|
--- gdbm-1.24.orig/tools/var.c
|
||||||
|
+++ gdbm-1.24/tools/var.c
|
||||||
|
@@ -27,7 +27,7 @@
|
||||||
|
union value
|
||||||
|
{
|
||||||
|
char *string;
|
||||||
|
- int bool;
|
||||||
|
+ int boolean;
|
||||||
|
int num;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -90,7 +90,7 @@ static struct variable vartab[] = {
|
||||||
|
.name = "confirm",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 1 }
|
||||||
|
+ .init = { .boolean = 1 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "cachesize",
|
||||||
|
@@ -114,32 +114,32 @@ static struct variable vartab[] = {
|
||||||
|
.name = "lock",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 1 }
|
||||||
|
+ .init = { .boolean = 1 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "mmap",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 1 }
|
||||||
|
+ .init = { .boolean = 1 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "sync",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 0 }
|
||||||
|
+ .init = { .boolean = 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "coalesce",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 0 },
|
||||||
|
+ .init = { .boolean = 0 },
|
||||||
|
.sethook = coalesce_sethook
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.name = "centfree",
|
||||||
|
.type = VART_BOOL,
|
||||||
|
.flags = VARF_INIT,
|
||||||
|
- .init = { .bool = 0 },
|
||||||
|
+ .init = { .boolean = 0 },
|
||||||
|
.sethook = centfree_sethook
|
||||||
|
},
|
||||||
|
{
|
||||||
|
@@ -252,21 +252,21 @@ s2b (union value *vp, void *val, int fla
|
||||||
|
for (i = 0; trueval[i]; i++)
|
||||||
|
if (strcasecmp (trueval[i], val) == 0)
|
||||||
|
{
|
||||||
|
- vp->bool = 1;
|
||||||
|
+ vp->boolean = 1;
|
||||||
|
return VAR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; falseval[i]; i++)
|
||||||
|
if (strcasecmp (falseval[i], val) == 0)
|
||||||
|
{
|
||||||
|
- vp->bool = 0;
|
||||||
|
+ vp->boolean = 0;
|
||||||
|
return VAR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
n = strtoul (val, &p, 0);
|
||||||
|
if (*p)
|
||||||
|
return VAR_ERR_BADTYPE;
|
||||||
|
- vp->bool = !!n;
|
||||||
|
+ vp->boolean = !!n;
|
||||||
|
return VAR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -286,7 +286,7 @@ s2i (union value *vp, void *val, int fla
|
||||||
|
static int
|
||||||
|
b2b (union value *vp, void *val, int flags)
|
||||||
|
{
|
||||||
|
- vp->bool = !!*(int*)val;
|
||||||
|
+ vp->boolean = !!*(int*)val;
|
||||||
|
return VAR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -307,7 +307,7 @@ i2i (union value *vp, void *val, int fla
|
||||||
|
static int
|
||||||
|
i2b (union value *vp, void *val, int flags)
|
||||||
|
{
|
||||||
|
- vp->bool = *(int*)val;
|
||||||
|
+ vp->boolean = *(int*)val;
|
||||||
|
return VAR_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -414,7 +414,7 @@ variable_get (const char *name, int type
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VART_BOOL:
|
||||||
|
- *(int*)val = vp->v.bool;
|
||||||
|
+ *(int*)val = vp->v.boolean;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VART_INT:
|
||||||
|
@@ -461,7 +461,7 @@ variable_print_all (FILE *fp)
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VART_BOOL:
|
||||||
|
- fprintf (fp, "%s%s", vp->v.bool ? "" : "no", vp->name);
|
||||||
|
+ fprintf (fp, "%s%s", vp->v.boolean ? "" : "no", vp->name);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VART_STRING:
|
||||||
|
@@ -647,7 +647,7 @@ centfree_sethook (struct variable *var,
|
||||||
|
{
|
||||||
|
if (!v)
|
||||||
|
return VAR_OK;
|
||||||
|
- return gdbmshell_setopt ("GDBM_SETCENTFREE", GDBM_SETCENTFREE, v->bool) == 0
|
||||||
|
+ return gdbmshell_setopt ("GDBM_SETCENTFREE", GDBM_SETCENTFREE, v->boolean) == 0
|
||||||
|
? VAR_OK : VAR_ERR_GDBM;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -656,7 +656,7 @@ coalesce_sethook (struct variable *var,
|
||||||
|
{
|
||||||
|
if (!v)
|
||||||
|
return VAR_OK;
|
||||||
|
- return gdbmshell_setopt ("GDBM_SETCOALESCEBLKS", GDBM_SETCOALESCEBLKS, v->bool) == 0
|
||||||
|
+ return gdbmshell_setopt ("GDBM_SETCOALESCEBLKS", GDBM_SETCOALESCEBLKS, v->boolean) == 0
|
||||||
|
? VAR_OK : VAR_ERR_GDBM;
|
||||||
|
}
|
||||||
|
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 7 10:57:28 UTC 2025 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix build with gcc15
|
||||||
|
+ gdbm-gcc15.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 10 08:16:24 UTC 2024 - pgajdos@suse.com
|
Tue Sep 10 08:16:24 UTC 2024 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gdbm
|
# spec file for package gdbm
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -31,6 +31,8 @@ Source2: baselibs.conf
|
|||||||
Source4: %{name}.keyring
|
Source4: %{name}.keyring
|
||||||
# PATCH-FIX-SUSE: remove the build date from src/version.c
|
# PATCH-FIX-SUSE: remove the build date from src/version.c
|
||||||
Patch4: gdbm-no-build-date.patch
|
Patch4: gdbm-no-build-date.patch
|
||||||
|
# build with gcc15
|
||||||
|
Patch5: gdbm-gcc15.patch
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: makeinfo
|
BuildRequires: makeinfo
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
|
Reference in New Issue
Block a user