-
Notifications
You must be signed in to change notification settings - Fork 524
fcode-utils fixes compile with gcc 15 #6013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lygstate
wants to merge
1
commit into
msys2:master
Choose a base branch
from
lygstate:fcode-utils-gcc15
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| From 2ce5a550cb998ce63ed049ed1fcb9106ecadf234 Mon Sep 17 00:00:00 2001 | ||
| From: Yonggang Luo <luoyonggang@gmail.com> | ||
| Date: Mon, 5 Jan 2026 12:14:31 +0800 | ||
| Subject: [PATCH] fixes compiling with gcc 15 | ||
|
|
||
| --- | ||
| detok/detok.c | 2 +- | ||
| toke/conditl.c | 2 +- | ||
| toke/nextfcode.c | 2 +- | ||
| toke/scanner.c | 2 +- | ||
| toke/ticvocab.h | 4 ++-- | ||
| 5 files changed, 6 insertions(+), 6 deletions(-) | ||
|
|
||
| diff --git a/detok/detok.c b/detok/detok.c | ||
| index c3b5fb6..01fdfbf 100644 | ||
| --- a/detok/detok.c | ||
| +++ b/detok/detok.c | ||
| @@ -60,7 +60,7 @@ bool show_offsets = false; | ||
| * TRUE preceding error-exit */ | ||
| static void print_copyright(bool is_error) | ||
| { | ||
| - typedef void (*vfunct) (); /* Pointer to function returning void */ | ||
| + typedef void (*vfunct) (char *); /* Pointer to function returning void */ | ||
| vfunct pfunct; | ||
| char buffr[512]; | ||
|
|
||
| diff --git a/toke/conditl.c b/toke/conditl.c | ||
| index b491310..842a8f6 100644 | ||
| --- a/toke/conditl.c | ||
| +++ b/toke/conditl.c | ||
| @@ -594,7 +594,7 @@ static void conditionally_tokenize( bool cond, bool alr_ign ) | ||
|
|
||
| static void conditional_word_in_line( bool alr_ign, | ||
| bool exist_test, | ||
| - bool (*exist_funct)() ) | ||
| + bool (*exist_funct)(char *) ) | ||
| { | ||
| if ( get_word_in_line( statbuf) ) | ||
| { | ||
| diff --git a/toke/nextfcode.c b/toke/nextfcode.c | ||
| index d0bbacb..7c01fcf 100644 | ||
| --- a/toke/nextfcode.c | ||
| +++ b/toke/nextfcode.c | ||
| @@ -369,7 +369,7 @@ void list_fcode_ranges( bool final_tally) | ||
| }else{ /* List the collection of Ranges */ | ||
|
|
||
| /* Pionter to function returning void */ | ||
| - typedef void (*vfunct)(); | ||
| + typedef void (*vfunct)(char *, unsigned int); | ||
|
|
||
| /* Function for the started_at() part of the message */ | ||
| vfunct start_at_funct = | ||
| diff --git a/toke/scanner.c b/toke/scanner.c | ||
| index 2bc1047..46d327d 100644 | ||
| --- a/toke/scanner.c | ||
| +++ b/toke/scanner.c | ||
| @@ -343,7 +343,7 @@ typedef struct source_state | ||
| unsigned int old_lineno; | ||
| bool pause_before_pop; | ||
| bool sav_rep_multlin; | ||
| - void (*resump_func)(); | ||
| + void (*resump_func)(_PTR); | ||
| _PTR resump_param; | ||
| } source_state_t ; | ||
|
|
||
| diff --git a/toke/ticvocab.h b/toke/ticvocab.h | ||
| index a53e092..d9a6ec5 100644 | ||
| --- a/toke/ticvocab.h | ||
| +++ b/toke/ticvocab.h | ||
| @@ -179,7 +179,7 @@ typedef struct tic_hdr | ||
| { | ||
| char *name; | ||
| struct tic_hdr *next; | ||
| - void (*funct)(); /* Function for active processing */ | ||
| + void (*funct)(tic_param_t); /* Function for active processing */ | ||
| tic_param_t pfield; | ||
| fwtoken fword_defr; /* FWord Token of entry's Definer */ | ||
| bool is_token; /* Is entry a single-token FCode? */ | ||
| @@ -278,7 +278,7 @@ typedef struct tic_bool_hdr | ||
| tic_bool_param_t pfield; | ||
| fwtoken fword_defr; | ||
| bool is_token; /* Is entry a single-token FCode? */ | ||
| - void (*ign_func)(); | ||
| + void (*ign_func)(tic_bool_param_t); | ||
| int pfld_size; | ||
| bool tracing; /* TRUE if Invoc'n Msg required */ | ||
| } tic_bool_hdr_t ; | ||
| -- | ||
| 2.52.0.windows.1 | ||
|
|
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2,26 +2,47 @@ | |
|
|
||
| pkgname="fcode-utils" | ||
| pkgver=1.0.3 | ||
| pkgrel=1 | ||
| pkgrel=2 | ||
| pkgdesc="The OpenBIOS FCODE suite" | ||
| arch=('i686' 'x86_64') | ||
| url="https://www.openbios.org/" | ||
| msys2_repository_url="https://github.com/openbios/fcode-utils" | ||
| license=('GPL2') | ||
| makedepends=('make' 'gcc') | ||
| source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/openbios/fcode-utils/archive/v${pkgver}.tar.gz") | ||
| sha256sums=('9a37771b0547f7b5110069f1653aacca60335daae1dba2a7a9edc99a54227a0b') | ||
| makedepends=('make' 'gcc' 'git') | ||
| _commit='545fdf1faedc5fb5342a3ea44a043edde501c3eb' | ||
|
|
||
| source=("fcode-utils"::"git+https://github.com/openbios/fcode-utils.git#commit=$_commit" | ||
| 0001-fixes-compiling-with-gcc-15.patch) | ||
|
|
||
| sha256sums=('ec3802d00b81361a73a1dff8baa4bad75f20ce8f4b25c31de5cb70385f75d40e' | ||
| 'c1c7b17df18d49741884c3c37cb1192ad86a04e90e08443d408016cc00c50ed3') | ||
|
|
||
| # Helper macros to help make tasks easier # | ||
| apply_patch_with_msg() { | ||
| for _fname in "$@" | ||
| do | ||
| msg2 "Applying ${_fname}" | ||
| patch -Nbp1 -i "${srcdir}"/${_fname} | ||
| done | ||
| } | ||
|
|
||
| prepare() { | ||
| cd ${srcdir}/${pkgname} | ||
| apply_patch_with_msg \ | ||
| 0001-fixes-compiling-with-gcc-15.patch | ||
| } | ||
|
|
||
| build() { | ||
| cd ${srcdir}/${pkgname}-${pkgver} | ||
| cd ${srcdir}/${pkgname} | ||
| CFLAGS="-O2 -Wall -Wno-incompatible-pointer-types" \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please don't override CFLAGS, just add something if needed |
||
| make -j1 | ||
| } | ||
|
|
||
| package() { | ||
| cd ${srcdir}/${pkgname}-${pkgver} | ||
| cd ${srcdir}/${pkgname} | ||
| mkdir -p ${pkgdir}/usr/bin | ||
|
|
||
| cp -rf ${srcdir}/${pkgname}-${pkgver}/toke/toke.exe ${pkgdir}/usr/bin/ | ||
| cp -rf ${srcdir}/${pkgname}-${pkgver}/detok/detok.exe ${pkgdir}/usr/bin/ | ||
| cp -rf ${srcdir}/${pkgname}-${pkgver}/romheaders/romheaders.exe ${pkgdir}/usr/bin/ | ||
| cp -rf ${srcdir}/${pkgname}/toke/toke.exe ${pkgdir}/usr/bin/ | ||
| cp -rf ${srcdir}/${pkgname}/detok/detok.exe ${pkgdir}/usr/bin/ | ||
| cp -rf ${srcdir}/${pkgname}/romheaders/romheaders.exe ${pkgdir}/usr/bin/ | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the git version needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, because it's did not released for a long while.
and needs patches for building with gcc 15.x