Control: forwarded -1 t...@gene.com Control: tags -1 + patch Hi Thomas,
For information, we noticed in Debian bug #1096727[1] that gmap failed to build from source with Gcc 15 due to using by default the standard C 2023. [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096727 Here is an excerpt of the build log, obtained by Matthias Klose, on 2025-02-17: > 7 | typedef unsigned char bool; > | ^~~~~~~ > In file included from ../../src/gmap_select.c:1: > ../../src/bool.h:7:23: error: ‘bool’ cannot be defined via ‘typedef’ > 7 | typedef unsigned char bool; > | ^~~~ > ../../src/bool.h:7:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards > ../../src/bool.h:7:1: warning: useless type name in empty declaration > 7 | typedef unsigned char bool; > | ^~~~~~~ > In file included from ../../src/cpuid.h:4, > from ../../src/cpuid.c:6: I took the liberty to have a look at mitigating the build failure and came up with a patch which you may find useful and you will find in attachment. Have a nice day, :) -- .''`. Étienne Mollier <emoll...@debian.org> : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da `. `' sent from /dev/pts/0, please excuse my verbosity `-
Description: fix build failure with standard C 2023. This fixes a case of bool type definition, skipping the typedef when the standard is 202311L or greater. There are also a couple of indirect function calls needing adjustment. Author: Étienne Mollier <emoll...@debian.org> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1096727 Forwarded: no Last-Update: 2025-02-25 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- gmap.orig/src/bool.h +++ gmap/src/bool.h @@ -2,9 +2,11 @@ #ifndef BOOL_INCLUDED #define BOOL_INCLUDED +#if __STDC_VERSION__ < 202311L /* typedef enum{false,true} bool; */ typedef unsigned char bool; +#endif #define false 0 #define true 1 --- gmap.orig/src/iit-write-univ.c +++ gmap/src/iit-write-univ.c @@ -86,7 +86,7 @@ } static bool -is_sorted (int array[], int i, int j, Univcoord_T (*endpoint)(), struct Univinterval_T *intervals) { +is_sorted (int array[], int i, int j, Univcoord_T (*endpoint)(struct Univinterval_T *,int), struct Univinterval_T *intervals) { int lambda; for (lambda = i; lambda <= j - 1; lambda++) { --- gmap.orig/src/iit-write.c +++ gmap/src/iit-write.c @@ -96,7 +96,7 @@ } static bool -is_sorted (int array[], int i, int j, Chrpos_T (*endpoint)(), struct Interval_T *intervals) { +is_sorted (int array[], int i, int j, Chrpos_T (*endpoint)(struct Interval_T *, int), struct Interval_T *intervals) { int lambda; for (lambda = i; lambda <= j - 1; lambda++) {
signature.asc
Description: PGP signature